Introduction to OpenType Features: Context & Alternates

Once you’ve finished drawing your glyphs, how do you make them behave? OpenType features are the programmed rules that make your font “smart.” They are the invisible instructions that allow a font to automatically swap out characters, prevent awkward collisions, and give visual designers different stylistic choices.

While there are dozens of OpenType features, understanding how to substitute alternate drawings is the best place to start. Two of the most important tools in your typographic toolkit are Contextual Alternates and Stylistic Sets:

  • calt (Contextual Alternates): This feature makes your font aware of its surroundings. It tells the font to swap a glyph only when it sits next to specific letters. For example, in a script font, an ‘o’ might need a higher connecting stroke if it is followed by an ‘r’. calt swaps the standard ‘o’ for the alternate version automatically, making handwriting and cursive fonts look completely natural.
  • salt (Stylistic Alternates) & ss01, ss02 (Stylistic Sets): Sometimes you want to give the user stylistic choices. These features act like toggle switches in software like Illustrator or InDesign. While salt is a general pool for alternate letters, Stylistic Sets (ss01, ss02, etc.) allow you to group them. With one click, a user can turn on ss01 to swap all the traditional double-story ‘a’s and ‘g’s in a paragraph for geometric, single-story versions, instantly changing the mood of the typeface.

Taking the Next Step in FontLab

You don’t need to be a programmer to make a smart font. FontLab 8 has a powerful auto-generation engine that writes most of this code for you, as long as you name your glyphs correctly!

To learn how to set up your files, automate ligatures and small caps, and safely compile your code without breaking your font, read our full tutorial here:

👉 The Visual Designer’s Guide to Automating OpenType Features in FontLab

Note: The text, explanations, and formatting in this post were HEAVILY drafted, edited, and simplified for visual designers with the assistance of Google’s Gemini 3.1 Pro AI.