Files
harfbuzz/test/shape/data
Khaled Hosny 6b6f0d9770 [GPOS] Apply mark-attachment cross-direction offsets immediately
Fixes https://github.com/harfbuzz/harfbuzz/issues/4596

See the issue for more details.

Instead of deferring mark positioning to the end of GPOS application, we
now apply cross-direction offsets (y-direction in horizontal text)
immediately and keep applying main-direction (x-direction in horizontal
text) as before.

This is still not 100% compatible with DirectWrite or Core Text (they
apply both directions immediately), but enough to fix the reported
issue.

Based on Behdad’s patch below, but fixes the Noto Nastaliq regression by
resolving the base offset through the whole cursive attachment chain
since cursive offsets are relative the previous glyph and get finalized
only at end of GPOS:
https://github.com/harfbuzz/harfbuzz/issues/4596#issuecomment-2276300688

The remaining failure is not a regression, the new expectation now match
DirectWrite and Core Text.

The tests include a subsetted bug font, as well as two constructed fonts
where curs lookup come before mark ones, once with kern before mark and
with kern after mark, to show that lookup order affects y but not
x-direction.
2026-07-30 23:27:22 +03:00
..