googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

[cursFeatureWriter] Respect direction suffix when setting lookupflag #876

Closed khaledhosny closed 1 month ago

khaledhosny commented 1 month ago

By default we set RightToLeft lookupflag for RTL glyphs, which is a sane default. But, despite the flags name, it is not directly related to glyph directionality, rather it defines which glyphs stay at their natural position and which gets shifted. When the flag is set, glyphs to the right gets shifted, otherwise glyphs to the left.

GlyphsApp supports controlling the flag by adding .RTL or .LTR suffix to the anchor names, so we now support this as well.

See for examples of this: https://forum.glyphsapp.com/t/is-there-a-solution-for-vertical-kerning-in-arabic-script/26571/39