mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
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.