So, i want the Rial Currency unicode glyph to appear whenever someone types a number followed by the Rial arabic letters, i tried all i can try and it seems that because numbers are left-to-right it does not work!
Did anyone figure before how to do this?
i tried:
sub @arabic-numbers reh-ar' yeh-ar.init' alef-ar.fina' lam-ar' by rial; sub @arabic-numbers space reh-ar' yeh-ar.init' alef-ar.fina' lam-ar' by rial;
Inside the calt block sub @arabic-numbers reh-ar' yeh-ar.init' alef-ar.fina' lam-ar' by rial;
Do you have lookupflag IgnoreMarks RightToLeft on top of the block? Not sure if that’s require. Make sure the ‘calt’ feature is enabled inside the edit view and that the text direction is RTL. Also try placing the code in its own calt block.
Glyphs doesn’t contain a proper Arabic engine and is not to be trusted in those cases.
You are right, it is not possible because of the different direction of the numbers and the letters. The OpenType processing is split between the two and that breaks the context.
Should not be done either. That would be substitution of characters for another. It is the user’s and the layout engine’s job to type and change characters. The font should only mess around on the glyph level.
@mekkablue Think of it as a style, like the way we style “Allah” الله automatically for the user without the user’s need to type the accents him/her self.