adobe-type-tools / afdko

Adobe Font Development Kit for OpenType
https://adobe-type-tools.github.io/afdko/
Other
1.06k stars 167 forks source link

multiple lookups per glyph in chaining #463

Open mhosken opened 6 years ago

mhosken commented 6 years ago

In Chaining contextual lookups, the OT standard allows for an arbitrary sequence of glyphs and lookups, including repeated lookups on the same glyph. FEA is limited, in its implementations to only having one lookup per glyph and in a fixed order.

To solve the problem of allowing multiple lookups per glyph, I propose that the FEA syntax be extended to allow multiple lookup expressions following a marked glyph as in:

pos @base' lookup pair_base_next @next' lookup shift_next lookup pair_next_next @next' lookup shift_next;

This particularly odd rule is emulating a simple cursive attachment by doing initial placement of glyphs in a default position and then using pair kerning to adjust them contextually. In fact, due to the way the lookups are ordered, it does that in reverse doing the context adjustment before the placement. But since both lookups are doing adjustment and a+b = b+a there is no difference.

FWIW the FEA spec, as it stands, does not preclude such syntax, but neither are there implementations that support it yet.

As to the lookup ordering question, I know of no use cases that need it and neither can I think of a suitable syntax to facilitate it. A possible, but not ideal syntax might be:

pos @base' lookup3 pair_base_next @next' lookup1 shift_next lookup4 pair_next_next @next' lookup2 shift_next;
mhosken commented 5 years ago

I notice that this is also discussed in #108 (over 3 years old).

I also notice that there are still open fea syntax clarifications going back over 3 years. Would someone with sufficient authority be willing to spend a day to clear some (most) of the backlog?

miguelsousa commented 5 years ago

Thanks for the nudge and the patience. We've been chipping away at the backlog but also making improvements and trying to address the issues as they come. This and the other ones have not been forgotten nor they'll be dismissed, but at this time I can't provide an estimate of when they'll be resolved.