I’m working on contextual alternates using a pseudo-random approach.
How can I prevent conflicts with ligature features?
At the moment, only one of them works at a time. If I enable ligatures, the contextual alternates stop working.
I’d like both features to work together simultaneously.
This is usually caused by the lookup order.
Most shaping engines apply OpenType features in a (partly) predefined sequence, but within the set of lookups that get executed, the lookup order matters. In FontCreator, lookups are processed top-to-bottom as listed in the OpenType Designer’s Lookups folder.
What to try:
-
Open OpenType Designer.
-
Expand Lookups.
-
Locate your liga lookup(s) and your calt (contextual alternates) lookup(s).
-
Reorder them (drag/drop or Move Up/Down) and test:
- Often you want liga first, then calt, or the other way around depending on whether your alternates should apply before or after ligature formation.
If reordering doesn’t solve it, please attach a small FontCreator project (or a stripped-down version) that reproduces the issue (a few glyphs + your lookups/features). Then we can see exactly which substitutions are competing and suggest the best ordering or restructuring.
Hi,
Thank you for the explanation.
I’ve tried reordering the lookups as suggested, but unfortunately nothing changed.
Anyway I cannot upload attachment because new member. So this is Gdrive link of my FontCreator project file so you can take a look. I’ve kept it as minimal as possible to reproduce the issue.
Thanks in advance for your help.
Best regards,
Luthfi
Something seems to work better if you switch the order of Alternate1 and ChainingContext1.
Using text:
BB
Enable aalt with Alternate index set to 2.
Can you also provide some text and explain what you want to achieve?
Originally, I wanted the ligatures and calt to work properly together, but before this they didn’t. I reordered the lookups again by moving the ligature lookup above the others, and it finally worked.
At the moment, everything behaves as expected, so no further changes are needed.
Thanks again for your assistance!
