but in this combination, the dots should be placed a little bit more to the right.
Is it necessary to use an additional character, or could they be positioned conditionally by feature code somehow?
You probably know how Glyphs has been reliably and automatically creating mark and mkmk features based on your mark attachment anchors. Now there is a new twist to it: contextual mark attachment can be set up with special, asterisk-prefixed anchors again. Let’s take the bottom anchor in an Arabic sad-ar.init as an example. Let’s say, we want to move any bottom marks a bit to the left in case a preceding reh-ar reaches in from the right. What you do now is duplicate the bottom anchor and rename it to * bottom , i.e., you prefix it with an asterisk * , with or without a space in between. This is your contextual bottom anchor. Whenever a contextual anchor is selected, the palette sidebar on the right (Cmd-Opt-P) will display a section called Anchor Context at the bottom. And there, you can type your glyph context as you would in OT feature code, just with * as placeholder for the glyph, reh-ar * in our example. Since it is OT feature code, you can also type in class names, and even tokens:
If you need more than one contextual anchor, add an arbitrary dot suffix, e.g., *bottom.noon and *bottom.reh , and so forth.
The anchors work only for marks that are typed individually. If the string is “beh + hah”, the dot is in the beh and is not positioned by a mark. You would need to type “behdotless + dot below + hah”. Or use OpenType to decompose the “beh” into “behdotless + dot”.
I just had a look at your file.
There are two problems.
First, the anchor name should not have a space after the *.
But is doesn’t seem to work for RTL glyphs. I’ll need to investigate.
I am trying the ( * bottom ) anchor coupled with ( glyphname * ) placed in the Anchor Context filed, but no result is happening.
Another question. Does this conditional anchor feature work only when a glyph is following another specific one, like ( رإ ، ريس) ? Or does it also work for a glyph when it proceeds another specific one? Like (أكتب) And I want to add ( *top ) anchor for the hamza to move up if the alefHamzaabove-ar is followed by a kaf-ar.init ?
And in which applications is this feature active when the fonts are generated?
The code in the context text field can be set to whatever context you like. Maybe manually write the code in a feature until works as expected. And then put it in the anchor.
And if I want to make the Hamza shift up in the alefHamzaabove-ar if followed by kaf-ar.init? What should be the code placed in the Conditional Anchor and in its Anchor Context field?