[HarfBuzz] Issue with mark advance zeroing in generic shaper

Behdad Esfahbod behdad at behdad.org
Tue Apr 9 12:39:36 PDT 2013


At the Ngapi hackfest in February we changed the generic shaper to zero
advance of glyphs that are from characters that are non-spacing marks in
Unicode.  Before that, the decision to zero mark advance was based on the GDEF
class of the glyph.  Testing shows that Uniscribe uses one or the other
behavior in different shapers and now we try to do the same.

It was brought to my attention however, that if a mark glyph ligates with
following non-mark glyphs, HarfBuzz zeros the advance while Uniscribe doesn't.
 This makes sense.  We already have logic in GSUB for synthetic GDEF, to
categorize the ligature as mark if all components are mark.  I think we want
the same logic to be used for the Unicode general category.  Ie, if a non-mark
is present, change the category of the result to non-mark.

Here's a font for testing: https://bugs.freedesktop.org/attachment.cgi?id=72363

Here's the sequence: 0f42,U+0F7C,U+0F60,U+0F72,U+0F42

Uniscribe output:
[uni0F42=0+356|uni0F7C0F600F72=2+1782|uni0F42=4+356]

HB:
[uni0F42=0+356|uni0F7C0F600F72=0+0|uni0F42=4+356]

Note that the ligature in question has GDEF class 3 (mark), so it's definitely
the Unicode-based logic that is involved here, not GDEF-based.

I'll go ahead and add the logic to do this, though it's getting a bit uglier
than I like.

Cheers,
behdad
-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list