Contextual alternatives. Yeah, baby. What are they? What do they do? How can you use them? Let’s get into it with my font, Gilly Script.
Type “love” in my Gilly Script font and look at the final e. With contextual alternates switched off, its stroke reaches out towards a letter that isn’t there.
Switch them on and Gilly replaces it with a shorter ending. You’ve typed the same word, but the font has chosen a different glyph to suit the end position. The opening l changes too.
The changes can be really subtle. Some people might not even notice them. But for me, the devil is in the details, and those small changes make a real difference.
What are contextual alternates?
Contextual alternatives. Oh blimey. Don’t make me read this, Simon. Don’t make me read it. It’s going to be boring. Boring, boring, boring.
Well, it might be a bit boring, but if you’re a designer, sometimes you’ve got to read the boring shit to get to the good stuff.
Contextual alternates let a font select a different glyph according to the surrounding text. A glyph is a particular visual form of a character. You type the letter; the font’s rules select the glyph.
In Gilly Script, those rules can choose different beginnings and endings automatically. For a broader introduction, read my practical guide to contextual alternates in fonts.
Initial, medial, final and isolated forms
These are called positional forms, or positional alternates. There are four roles:
- Initial: a form used at the beginning of a word, leading into the lettering.
- Medial: a form used inside a word, working with the letters on either side.
- Final: a form used at the end of a word, finishing the lettering. Also called a terminal form.
- Isolated: a form used when a letter stands alone, with no neighbouring letters to join.
Here they are in “a moon-shaped pool”.
Contextual alternates off
Contextual alternates on
The standalone a uses an isolated form. The two o glyphs inside “pool” serve as medial forms, and the final l finishes the word.
The m begins “moon-shaped”, but Gilly doesn’t need to replace it. Its default glyph already works in that initial position. A position doesn’t always need a separate alternate glyph.
One letter, three positions
“Lull” makes a closer comparison possible: the same character appears at the beginning, inside the word and at the end.
Contextual alternates off
Contextual alternates on
Look at how each l starts and finishes. The first begins the word, the middle joins the letters on either side, and the last brings the word to an end. Gilly uses a different glyph for each position, adjusting the entry and exit strokes to suit.
Why the final e changes
Here’s a close-up of the change we saw in “love”.
The default e has a longer outgoing stroke. The final form cuts that extension back because there’s no next letter to meet. The main shape stays consistent; the ending changes.
The two a characters in “a cat”
Compare the a on its own with the a inside “cat”. Here are two versions: contextual alternatives off and contextual alternatives on.
Contextual alternates off
Contextual alternates on
With the feature on, the first a receives Gilly’s isolated form. The second keeps the default glyph between c and t. You haven’t applied different settings to the two letters: their surroundings determine which glyph appears.
Keep typing and an earlier letter can change
Type a lowercase e on its own in Gilly Regular. With contextual alternates enabled, it uses the final form. Continue typing until the text reads “eleven” and that first e returns to the default form.
The e has stopped being the last letter. Your application reassesses the text and applies the matching substitution. That’s why a letter can change after you’ve typed it.
Does this make repeated letters look random?
Not necessarily. Some fonts use contextual rules to vary repeated letters, but Gilly’s “hello” example does something different.
Both l characters keep the same glyph. The opening h and final o change instead. Contextual alternates follow the rules built into that particular font; they don’t automatically randomise every repeated letter.
Alternates, ligatures and stylistic sets
These features can work together, but they serve different purposes:
- Contextual alternates select glyphs according to programmed conditions.
- Ligatures replace a sequence of characters with a combined glyph.
- Stylistic sets apply a predefined selection of alternative designs.
Gilly Regular contains all three. In these comparisons, standard and discretionary ligatures stay off. Font size and tracking settings stay identical, although alternate glyphs can change the width of a word.
How to turn contextual alternates on in Illustrator
- Select your text and apply Gilly.
- Open Window → Type → OpenType.
- Enable Contextual Alternates, expanding the panel options if necessary.
- Toggle it off and on to compare.
Other applications organise these controls differently, and some enable the feature by default.
If nothing changes, check the selected font, your application’s support and the text itself. Lowercase “love” triggers the opening l and final e substitutions in the Gilly Regular file tested here. Different versions and other active features can affect the result.
For the curious: glyph names and feature tags
The contextual-alternates feature is called calt. Gilly’s positional glyph names include l.init for an initial l, l.fina for a final l and a.isol for an isolated a.
A medial form can have a .medi suffix, but Gilly’s middle l is simply named l: the default glyph does that job. Nor does every letter need four separate glyphs. A standalone e uses e.fina, while the standalone a has its own a.isol.
The suffix identifies a glyph variant. The substitution rules make it appear. There are also OpenType features called init, medi, fina and isol, intended for writing systems with inherent joining behaviour, such as Arabic. For Latin script fonts, Glyphs recommends handling positional switching through calt.
Terminology checked against the Glyphs Handbook, which calls fina Terminal Forms, and Glyphs’ guide to positional alternates, which also uses final forms.
Try a word you’re actually designing with
Use “love”, “lull” and “a cat” to understand the mechanism. Then try your own headline, name or phrase.
Compare both settings at the intended size. Check the entrance strokes, endings and spaces between letters. Keep the automatic choices that work and adjust anything that doesn’t.
Application instructions: Adobe’s guide to contextual alternates in Illustrator.
Written by Simon Stratford, type designer and graphic designer. These are my opinions, reached after too little sleep and too much coffee. You can also follow my antics on @itsmesimonok, or leave a comment below. Despite all the opinions, I’m actually quite nice.