Here is a Kufi-like Arabic script font, and here are most of the main glyphs:
Notice how some of them are extremely similar, only differing by height. Also you'll note that some are similar but differ slightly because they appear at the beginning/middle/end. I am not concerned with the latter, but I am not sure what the former are used for (the ones differing only by height). See these for example:
Those two sets have glyphs differing only by height it seems. The second has 3 which slant upwards, and 3 which are flat. Are these different characters? I have asked some Arabic speakers and they said no, they are not different characters (I am somewhat familiar with the Arabic alphabet). Instead they say it is for "aesthetic purposes". But they didn't explain how the font chooses which one out of the 3? How does the font decide (roughly speaking) which one to choose, if it's purely aesthetic?
Then this next image has a vertical line, one which is straight, and one which is slightly curved. Is this the same situation here?
Any help would be appreciated in understanding what the purpose of these seemingly aesthetic variants are, and how to take advantage of them.
If it is purely an aesthetic thing, I don't understand how you would select between the aesthetic variants. How does that work in a font even?