I’m making an Arabic font that has decomposed dots (in ccmp glyphs are subbed with their skeleton and a mark of their respective dots which get placed via mark attachment).
I need to have 2 dot positions for some letters, the default (somewhat centered) and another to the far right as a stylistic set. In a normal font with indvidual glyphs representing various letters and their forms, I’d set the second anchor point in the base and make an alternate SS glyph to sub in which uses the alternate anchor position. Works great.
But for this font I have only the base and its anchors to work with since all the dots are placed via <mark> . Ideally I wouldn’t need to create a duplicate set of glyphs with the alternative anchor point but rather set the alternate anchor and access it via OpenType for the stylistic set. Is there a way to do this?
I had a look. You can use tokens to refer anchor positions in the feature code.
But it seems that the ss01 feature will be placed before the default mark feature. So it will be overridden. I’ll need to find a workaround for this.
So .. add the mark feature with the #Automatic Code comment, then have the ss01 lookup below it and use tokens to change the dot position to the alternate anchor?
The mark classes should be writing automatically on export. You shouldn’t need to add them. Have a look at the fea file in the temp folder. You might get errors in the feature view but you can ignore them.
The error is also in the rest of the code any time I try to use a token with Arabic glyph names that have dashes. I switched to the @mark_top generated class and the error comes up again in the positioning code.
For example this gives the same error (and doesn’t export): pos base noonghunna-ar <anchor ${noonghunna-ar:anchors.top_ss01.x} ${noonghunna-ar:anchors.top_ss01.y}> mark @mark_top;
In the token, everything before the dash in the glyph name is getting removed. In my screenshot before you can see it’s using “ar” instead of “dotabove-ar”, and in the example here it’s the same.