This is a feature request. Could we please have the ability to specify multiple contexts for contextual anchors, possibly one per line?
Assuming an Arabic font with fully decomposed dots. Suppose I want an anchor contextualised on the previous glyph being a REH-shape, I create one like so:
Strange, that doesnât work sometimes. Itâs fine if the previous word ends âŰȘ۱â but not if the previous word ends âۚ۱â. Oh, itâs because the BEH has a dot below, which is now in the shaperâs âglyph streamâ so our contextual rule does not match! So I need two anchors, one with marks and one without:
Very soon I am cluttering up my glyph with lots of alternate anchors which only exist to slightly modify the context. If I could have one anchor with the context:
Iâm told if you donât set the context for a contextual anchor, Glyphs will generate an anchor lookup but no contextual one, so one can write a contextual lookup in the feature code and reference the anchor lookup from it. I havenât tried this yet, but if it works it would be a better way to handle more complex contextual rules.
If youâre working on this in G4, please also add the ability to sync contexts of the same anchor across masters. Sometimes due to changing the context but not quite copying it to all masters, they get out of sync and incompatible. It doesnât really make sense if the same anchor has different contexts across its designspace if a variable font is being built; in fontmake this is an error, but in Glyphs it compiles silently and who knows which context is actually used?
Good point. Iâll have an idea. It could sett the same context for all layers everywhere time, like with the âin all Mastersâ commands that you get when holding the option key.
And then I have to write the contextual rules manually? How do I know what lookup name to use to trigger the anchor? (I still think it would be cleaner just to allow one context per lineâŠ)
You can inspect the feature code in the temp folder. There you find all lookups and it is also a good place to check how custom code is inserted.
Iâll see what I can do about the multi line support.