[HarfBuzz] Multiple substitution and mark positioning
Khaled Hosny
khaledhosny at eglug.org
Sat May 12 05:54:23 PDT 2012
Hi all,
There seems to be a difference between HarfBuzz and Uniscribe on how to
handle mark positioning when there is multiple glyph substitution,
namely HB seems to apply the mark to the last component while USP
applies it to the first component.
In other words, if there is <base> → <base₁><base₂> substitution, the
sequence <base><mark> will be rendered as if it was <base₁><base₂><mark>
with HB, but as <base₁><mark><base₂> with USP.
Using hb-shape with “uniscribe” shaper, and the word “سَتا” and Arabic
Typesetting font, I get
[uniFE8E=3+343|uniFE98=2+376|uni064E=0 at 501,-260|uni0640.curvehalf=0@,34+152|uniFEB3=0@,34+840]
^^^^^^^^
but with “ot” shaper, I get:
[uniFE8E=3+343|uniFE98=2+376|uni064E=0 at -11,-310|uni0640.curvehalf=0@,34+152|uniFEB3=0@,34+840]
^^^^^^^^
though the glyph string is the same, the position of the mark is clearly
different.
(background: I need this to contextually insert tatweel to avoid mark
collision in “crowded” places, but with the difference between both
engines this can’t be reliably done without breaking mark positioning in
one of them).
Regards,
Khaled
More information about the HarfBuzz
mailing list