Start with Isolated Letters
Just like most other languages, you can start adding Arabic glyphs to your font by clicking the language from the sidebar and right-clicking the set you want to add:
Select the glyphs you want to add, or simply select all of them, and click Generate. You’ll notice that Glyphs uses human-readable names like
alef-ar as opposed to ‘uni0627’ or ‘afii57415’. The
-ar suffix, as you probably have guessed already, indicates that the glyph belongs to the Arabic script. (In case you’re worried, Glyphs does replace the names with the appropriate counterparts at export time.)
Once you have created the glyphs, you can go ahead and fill them with Arabic letters in their isolated forms. Sometimes, you will find that a glyph consists of components, such as the
In this example, I disabled the automatic alignment and dragged the two component placeholders apart. At the moment, they are pointing towards empty glyphs. That’s why you see placeholders that say ‘empty base glyph’. If you click on those, the info panel will display which glyphs they are pointing to:
You see, one is the
dotlessbeh-ar, the other one is the
dotbelow-ar. Right now, they are missing, but you can create them by double clicking on the ‘Missing Base Glyph’ placeholders. Let’s start with the
dotlessbeh-ar, which is the beh without the dot. Just draw the bow, set the width in the grey info panel, and add the appropriate anchor via Glyph > Set Anchors (Cmd-U). Glyphs will automatically add a top and a bottom anchor. The anchors are the spots where the dots will attach. The top anchor is probably too high. You can fix their position by simply dragging them around. Eventually, your
dotlessbeh-ar could look something like this:
Now, we do the same thing with the
dotbelow-ar. We draw the dot below the baseline and let Glyphs set the anchors again. This time, we get a _bottom anchor with a preceding underscore (‘_’). A _bottom anchor (with underscore) in an accent attaches to bottom anchor (without underscore) in a base letter. This way, we can compose letters with other glyphs as components, just like Lego bricks.
dotbelow-ar may look something like this in the end:
Now, since our
beh-ar already has both a component referring to
dotlessbeh-ar and a component referring to
dotbelow-ar, I’m curious as to what our
beh-ar looks like now:
Wooha, not too bad! The grey representation means they are components referring to other glyphs. If you change those original glyphs, the components will change as well. You see, components work very much like aliases on a Mac or like links in Unix.
Of course this is just one letter. As you can imagine, things work similarly for other letters, and those components can be re-used in other letters as well. For instance, the
dotlessbeh-ar can be a component in
theh-ar et cetera.
Adding Initial, Medial and Final Forms
You know, Arabic is written from right to left, and most letters actually connect to each other. This means that letters must change their shape depending on where in the word they are positioned. At the beginning, they must have an initial form, in the middle a medial variation, and at the end of a word, they assume a final shape. So far, we only have isolated shapes, i.e. the form the letters assume outside a word context.
Technologically, this is pretty complicated, because the font must switch glyphs depending on the context. This means we need a lot of glyph variations and feature code, plus the letters must be built in a way so they can connect easily. Sounds like a lot of work. But… do not despair, because again, Glyphs will help you a whole lot.
Let’s stick with the
beh-ar example. We already created the isolated form and called it
beh-ar. So far, so good. In order to create the initial, medial and final shapes, we add these glyphs to our font:
beh-ar.init beh-ar.medi beh-ar.fina
You can simply copy these glyph names into the clipboard, choose Glyph > Add Glyphs… (Cmd-Shift-G) and paste them into the appearing text box:
Once you hit Generate, your font will contain initial, medial and final forms of
beh-ar. And the good thing is, they are, again, built from components. And the
dotbelow-ar is already done! Great, saves us half the work. Now, all we need to do is build
dotlessbeh-ar.fina, position the top and bottom anchors, and we will end up with something like this:
Let’s open an edit tab and type
beh-ar three times in a row, and (important!) click the ‘RTL’ (right-to-left) button in the bottom right corner of the window:
Cool, the right shapes are used. But still, the shapes do not connect. How do we fix that?
Making the Letters Connect
Wouldn’t it be great if we could add anchors, much like the ones we used for the dots, but this time at the ends and the beginning of the strokes, and tell the font to connect the letters at those anchors?
Well, as it so happens, cough-cough, we can exactly do that, ha!
All we need to do is go into the
beh-ar.init, right-click and choose Add Anchor from the context menu. Then, we move the new anchor to the end of the stroke and, in the grey info panel, rename it to
exit. Approximately like this:
In the medial form, we again add an
exit anchor at the end of the stroke, but also an
entry anchor at the beginning:
And, you guessed it, in the final form, we just add an
entry anchor where the stroke starts:
So, now we can try out our three
beh-ar after each other. Again, don’t forget to switch to right-to-left writing, otherwise it won’t work. Here we go:
For the win! By the way, the technology we applied with the
exit points is called ‘cursive attachment’.
Of course, there are more Arabic letters than just the
beh-ar. You’ll find good descriptions in a few places. Watch out, not all letters have all four different shapes (isolated, initial, medial, final). Many of the font examples sport shapes that are drawn in such a way that the letters connect without the cursive attachment we used above.
And again, Glyphs can help you a lot. Just open Window > Glyph Info and type
-ar.fina into the search box. To find all variations, search for
-ar. et cetera. You get the idea.
It’s that easy to get started. Sure, there is much more to it, and we’ll cover that in the near future. In the meantime, have fun experimenting with Arabic letters.