Ligatures

Designing a font is not just the process if designing individual letters – letters have to work well next to each other. This clip explains how to solve the problem where upper part of f merges with the dot above i. The character sequence fi is replaced by a single fi ligature.

Video: https://www.youtube.com/watch?v=9v69rQh9MAI

  1. Open the spacing tab and type a work with the letter combination you want to create a ligature from. In this case “fi” (Ctrl+l on Windows and Command+l on Mac will open the spacing tab).
  2. Create a new glyph for the ligature. (Menu→Ligatures→Add Ligature)
  3. Type the name of the ligature and press enter.
  4. Open the kerning tab and double click on the ligature.
  5. BirdFont gives you several options for creating the new glyph. You can autotrace the the ligature, import the ligature from another editor or draw it using a grid.
  6. Go to Menu→Ligatures→Show Ligatures and click on New Ligature.
  7. Type the name of the ligature in the first field.
  8. Type the character sequence that should be replaced with the ligature in the second filed. The characters should be separated by space and you can use Unicode values on form U+XX where XX is the Unicode value in hex to insert letters that are not on your keyboard.
  9. Switch to the spacing tab to see the result.

Contextual Substitution

Contextual ligatures lets you create ligature a substitution that only happens in a certain context. The input sequence of letter has three parts: backtrack, middle and lookahead. The middle part will be replaced by a ligature if it is followed by the lookahead sequence and preceded by the backtrack sequence. This is useful if you for instance are working on a script font where the letter connects to each other in different ways depending on the context. In Arabic script is this kind of substitution an essential part of the writing system.

Here is an example where R is replaced with an alternative glyph if it is followed by space:

  1. Create a new ligature Menu→Ligatures→Add Ligature
  2. Draw the a new r with long leg.
  3. Open the tab with substitution rules Menu→Ligatures→Show Ligatures
  4. Click on “New Contextual Ligature”. A new row will be created with four columns. The first column is the name of the ligature, the second column is the character that precedes the ligature, the third column is the character that will be replaced by the ligature and the fourth column is for the characters follows the ligature. All character sequences follows the same format as the kerning classes. Each letter is separated by space an you type “space” to make a rule for the space character.
  5. Type the name of the ligature in the first column
  6. Make sure the second column is empty since this substitution applies no matter which character that precedes the input sequence.
  7. Type R in the third column since we want the letter R to be replaced
  8. Type space in the fourth column since the substitution should occur only if r is followed by space.

A rule to substitute r with r.alt when it is followed by space looks like this:

Recursion

It is not possible to create a ligature substitution that uses the inserted ligature as input in another substitution. TTF and OTF have this limitation in order make it impossible to create substitutions that crashes the computer or printer. If it was possible to make recursive substitutions would the instruction to replace “a” with “aa” result in an infinite string and the computer would crash.

Support in Other Programs

Many programs with support for TTF and OTF formats does not have support for ligatures but the major web browsers has this capacity. Look at the generated HTML file from BirdFonts preview tab for examples on how to use ligatures and other substitutions such as contextual alternates.