Ligatures
You would love to know how to create ligatures? It’s super easy. Try it.
Sometimes letters collide and it doesn’t really look that good. This often happens with the lowercase f, which usually reaches into the following letter. And if that letter happens to have an ascender, like an l, a b or an h, the letters collide. This is when type designers decide to build a ligature glyph.
Creating the ligature
Say, our lowercase f collides with the lowercase h:
Not nice. So let’s create a ligature glyph: Choose Glyph > Add Glyphs… and type f_h
, i.e. the glyph names of the individual parts of the ligature, connected by underscores. Glyphs will pre-build the ligature with f
and h
components:
Now, we should turn these components into individual paths, thus killing the link to the original f
and h
. We do this by choosing Decompose Components (Cmd-Shift-D) from the Glyph menu. Now we have the outlines:
And we can edit them to our liking:
Okay, please don’t laugh. I’m not the best ligature builder on the planet, big deal. In any event, this concludes the creation of the glyph. But how do we get it to work?
Creating the ligature feature
Ligatures work through OpenType features. Glyphs can create them automatically for you if it finds properly named ligatures among your glyphs. Just open File > Font Info (Cmd-I), go to the Features tab and hit the Update button in the bottom left:
And, probably among a few other things, Glyphs will create a feature called dlig
. If you click on it, you can take a look at the feature code:
sub f h by f_h;
Which means: substitute the sequence f
followed by h
with the ligature glyph f_h
. Exactly what we wanted. Yay!
liga vs. dlig
But wait a minute, why dlig
? That’s short for discretionary ligatures and means that the feature is ‘off by default’, i.e., the user is required to activate it first.
If we want it to be on by default, we ought to put it into a feature called liga
(standard ligatures). The best practice is to add a .liga
suffix to the glyph name. In our case, we can rename our ligature to f_h.liga
.
Now hit the Update button again, and lo and behold, we have a liga
feature which contains this:
sub f h by f_h.liga;
Yes! For the record, some ligature glyphs are placed into liga
right away, so they do not need a suffix. Here’s the complete list:
fi
fl
f_f
f_f_i
f_f_l
You may have noticed that fi
and fl
do not adhere to the naming convention we mentioned above. That’s because they are historical exceptions. These two glyph names were there long before OpenType. Actually, you can still call them f_i
and f_l
if you want, but again, they’ll go into dlig
unless you add the .liga
suffix.
Ligature anchors
Adding anchors to a ligature will give you slightly different anchors than usual. So, choose Glyphs > Set Anchors (Cmd-U), or if you have multiple masters, then hold down the Opt key to turn the command into Glyphs > Set Anchors for all Masters (Cmd-Opt-U), and you will receive:
top_1
top_2
bottom_1
bottom_2
and the like: all the accent anchors need to be specified for each part of the ligature. So, the anchor names are the same as in a single glyph, except for a underscore-number suffix indicating the number of the letter. For instance,top_3
means the top anchor for the third letter in the ligature. These anchors work both for composites and for mark-to-base positioning.caret
anchors: preferably put on the baseline, these anchors indicate potential cursor positions when a user moves their cursor through a word containing a ligature. If you have a ligature with three or more letters, the order of anchors do not matter, just their x coordinates are important. So you cannot make a cursor go backwards in a word. Attention: not every app supports caret positioning. Mac apps like TextEdit do, Adobe apps don’t.
If you have placed the anchors nicely, the anchors in your ligature may look like this:
Testing ligatures
Wanna see if it actually works? Open an edit tab (Cmd-T), type a word that contains the ligature sequence, e.g. ‘hifhum’ in our case. (I don’t think it means anything, and if it does, I hope it’s nothing nasty.) Now click on the Features button in the bottom left corner of the window and choose one of the ligatures features from the pop-up menu that appears:
And the ligature is applied:
If it doesn’t work for you, make sure the glyph name is correct and perhaps re-generate the feature code by pressing the Update button in Font Info > Features or choosing Update Features from the Features pop-up menu in Edit view.
Useful scripts and plug-ins
Ligature Caret: Friedrich Althausen wrote this visualization plug-in for caret positioning. Get it for free in Plugin Manager, and activate it through View > Ligature Caret.
Arabic anchor ordering: the mekkablue scripts contain Anchors > Fix Arabic Anchor Ordering in Ligatures which reorders all numbered top and bottom anchors from right to left in all Arabic ligatures like lam_alef-ar
, preserving the coordinates. Wrong anchor ordering can happen in file format conversions. If your font is affected, running this script once should fix it.
Alright, that’s about it. Have fun building ligatures!
Update 2016-02-19: updated screenshots for Glyphs 2.
Update 2019-04-10: changed Layers menu for Glyph menu.
Update 2020-12-04: updated links and screenshots, minor changes for Glyphs 3.
Update 2022-07-23: added Ligature anchors and Useful scripts and plug-ins.