How to Reorder OpenType Lookups in FontForge
Reordering OpenType lookups in FontForge is entirely possible and often necessary to ensure text shaping engines apply typographic rules—such as ligatures, contextual substitutions, and kerning—in the intended sequence. This guide outlines how to navigate FontForge's lookup interface, the steps to change lookup order, and why lookup sequence is critical to proper font functionality.
Why Lookup Order Matters
OpenType layout engines process lookups sequentially. When a glyph or string of glyphs enters the shaping pipeline, the engine evaluates each lookup in the order defined inside the font's lookup tables. If an earlier lookup replaces or alters glyphs that a subsequent lookup depends on, the later rule may fail to trigger. Consequently, placing substitutions like decomposition before ligature formation, or general ligatures before contextual alternates, determines whether your font renders properly.
Steps to Reorder Lookups
You can change the execution sequence of your lookups through the Font Info dialog:
- Open Font Info: In FontForge, open your font file
and navigate to Element > Font Info
from the top menu, or press
Ctrl + Shift + F(Cmd + Shift + Fon macOS). - Navigate to Lookups: In the sidebar on the left, click on Lookups.
- Select the Table: OpenType lookups are separated
into two primary categories across tabs at the top of the dialog:
- GSUB: Glyph Substitution (ligatures, alternates, swashes).
- GPOS: Glyph Positioning (kerning, mark-to-base, mark-to-mark). Choose the tab containing the lookup you need to move.
- Select and Move the Lookup:
- Click on the lookup name in the list to highlight it.
- Use the Up and Down buttons located on the right side of the list to move the selected lookup higher or lower in the execution order.
- Apply the Changes: Click OK at the bottom of the Font Info dialog to commit your changes.
Best Practices
- Keep Subtables with Their Parent: Reordering lookups moves the entire lookup along with its associated subtables. If you only need to reorder subtables within a single lookup, select the subtable and use the same Up and Down controls.
- Test After Reordering: Always validate your changes using the Metrics window (Metrics > New Metrics Window) or by exporting a test build to ensure that contextual chains and complex scripts still shape as expected.
- Maintain Separate GSUB/GPOS Logic: Lookups cannot be moved between GSUB and GPOS tables because they perform fundamentally different operations (substituting glyph IDs versus altering X/Y coordinates).