Multiple alternatives in arabic

Hi, I made an Arabic font with lots of alternative glyphs (stylistic), but I don’t want to use stylistic sets because in adobe apps it doesn’t let the user to switch alternative for every single glyph, you just have to choose between sets and it changes every glyph included in that set. what I want is alternatives for every glyph like this:

i tried writing “aalt” feature and writed it like this:
sub A by [A.1 A.2 A.3]; (as mentioned in this post: How to make multiple glyphs accessible from Adobe's alternate character popup - #4 by annettewolter)
but glyphs gives me error said:
47%20AM

then i tried writing every substitution separately in every line of code like :
sub A by A.1;
sub A by A.2;
and it kinda worked! but because my font is Arabic it doesn’t show the correct glyph for alternatives
image
as you see it shows final forms of “meem” in photoshop that doesn’t represent the actual medi alternative at all!
Im not sure if im missing something in here or doing it completely wrong because im a noobie, that would be great if anybody could help me.

If it is not sets, you can use character variants, with suffixes from .cv01 through .cv99.

The difference to stylistic sets is that x.cv01 and y.cv01 are not expected to be related in style, whereas x.ss01 and y.ss01 are supposed to be of the same stylistic variation (a “set” of glyphs).

One more thing. Make sure the .cvXX suffixes (where XX is anything from 01 to 99) comes last, after the positional suffixes (.init, .medi, .fina). Then you can let Glyphs generate the feature code automatically. You do that by pressing Update in File > Font Info > Features.

i tried “.cv” as you said, and it works but not perfectly!
in adobe illustrator when i hover over the characters it shows character variants :
image
but the problem is when i select another alternate for a medi character it destroys connection for besides glyphs:
image
also,
in adobe Photoshop, still does not show character forms correctly:
image
im trying to change heh-medi in here, but it shows me alternates for fina and init forms! and also doesn’t show some alternates as well!
how can i fix this?

Illustrator shows all positional forms there as well. There is nothing you can or should do about that in the font. Users will have to know what they pick from the menu.

this problem makes it almost impossible to use alternates in illustrator! i see why arabic font does not have alternates much.

Welcome to the club :slight_smile:

We cannot prevent users from making mistakes with our font. We need to live with that.

The syntax for multiple alternates is:

sub A from [A.1 A.2 A.3];
1 Like

yes your right!

thank you man!