Adjust mark advance-width zeroing logic for Myanmar
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Feb 2013 14:44:57 +0000 (09:44 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Feb 2013 14:44:57 +0000 (09:44 -0500)
commit568000274c8edb5f41bc4f876ce21fcc8bdaeed8
treeba8f6b9059dabe03d82afa26f46e3caf3eba9cbf
parent99749ca8e0c4c8dbea4620f07c4d0e6d1515cc65
Adjust mark advance-width zeroing logic for Myanmar

Before, we were zeroing advance width of attached marks for
non-Indic scripts, and not doing it for Indic.

We have now three different behaviors, which seem to better
reflect what Uniscribe is doing:

  - For Indic, no explicit zeroing happens whatsoever, which
    is the same as before,

  - For Myanmar, zero advance width of glyphs marked as marks
    *in GDEF*, and do that *before* applying GPOS.  This seems
    to be what the new Win8 Myanmar shaper does,

  - For everything else, zero advance width of glyphs that are
    from General_Category=Mn Unicode characters, and do so
    before applying GPOS.  This seems to be what Uniscribe does
    for Latin at least.

With these changes, positioning of all tests matches for Myanmar,
except for the glitch in Uniscribe not applying 'mark'.  See preivous
commit.
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-private.hh
src/hb-ot-layout.cc
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-default.cc
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-private.hh
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape.cc