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.
- 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).
- Create a new glyph for the ligature. (Menu->Ligatures->Add Ligature)
- Type the name of the ligature and press enter.
- Open the kerning tab and double click on the ligature.
- 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.
- Go to Menu->Ligatures->Show Ligatures and click on //New Ligature//.
- Type the name of the ligature in the first field.
- 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.
- Switch to the spacing tab to see the result.
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:
- Create a new ligature Menu->Ligatures->Add Ligature
- Draw the a new r with long leg.
- Open the tab with substitution rules Menu->Ligatures->Show Ligatures
- 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.
- Type the name of the ligature in the first column
- Make sure the second column is empty since this substitution applies no matter which character that precedes the input sequence.
- Type R in the third column since we want the letter R to be replaced
- 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:
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 have 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.