Created attachment 180047 [details] shaping is broken in the .odt In the attached document, the first line is how it should look, whereas in the second line, the shaping of two characters is broken. If "Formatting Marks" are removed, only one character (LAM before ALEF) is broken.
Created attachment 180048 [details] shaping is broken as shown in image
cc: Khaled Hosny, the expert in these matters. Not that he should fix it but his advice is always welcomed.
Confirmed. The letters with the different colors are made disconnected from their adjoining letters, and are thus typeset in their disconnected form. Note, however, that within the colored sequence of letters, connection is maintained, i.e. if you add both-side-connectible letters (like خ) to the red part, they'll be connected amongst themselves, just not to the first post-red black letter (the ر).
Created attachment 181731 [details] Screenshot showing parial shaping I think there are multiple other bug reports for this same issue. Basically currently a color change amounts to a font change, so there is no interaction at the low level across the color change. We try to handle this a bit more gracefully by passing the full text context to HarfBuzz even across font change to allow basic shaping (it would help with the خ here, but still break the لآ ligature), but I don’t know why it isn’t working for you, it works for me (using a different font).
(In reply to Khaled Hosny from comment #4) > Created attachment 181731 [details] > Screenshot showing parial shaping > > I think there are multiple other bug reports for this same issue. Basically > currently a color change amounts to a font change And is this the Right Thing to do, in your opinion?
(In reply to Eyal Rozenberg from comment #5) > (In reply to Khaled Hosny from comment #4) > > Created attachment 181731 [details] > > Screenshot showing parial shaping > > > > I think there are multiple other bug reports for this same issue. Basically > > currently a color change amounts to a font change > > And is this the Right Thing to do, in your opinion? No, it shouldn’t. But it is a big architectural change and I don’t even know what it entails. Instead of changing font on any style change, some style changes (like color, underline, font features, etc.) should be some kind of attribute applied to the text after shaping. Very few application handle this right, though. Firefox and recent-ish Chrome do, and IIRC Microsoft Word also does.
*** This bug has been marked as a duplicate of bug 61444 ***