How to Set Up Kerning Classes in FontForge
Kerning classes are an essential typographic tool that groups glyphs with identical spacing characteristics together, allowing you to kern entire sets of characters simultaneously rather than adjusting individual pairs one by one. This article explains the fundamentals of class-based kerning, highlights why it is vital for digital font design, and provides a clear, step-by-step walkthrough for creating and managing kerning classes directly inside FontForge.
Understanding Kerning Classes
In digital typography, manual pair-to-pair kerning requires adjusting every potential combination of characters individually. For a font with hundreds of glyphs, this results in tens of thousands of individual kerning pairs, which dramatically bloats the font file and increases workload.
Kerning classes solve this problem by organizing glyphs with similar optical shapes into groups. For instance, the accented characters Á, À, Â, and à typically share the exact same right-side and left-side spacing profiles as the base character A. By assigning these glyphs to a single class, any kerning adjustment made between that class and another group (such as a class containing V, W, and their variants) applies universally across all combinations within those groups.
Benefits of Class-Based Kerning
- Efficiency: Defining kerning rules between a few dozen classes replaces the need to manually adjust thousands of glyph pairs.
- Consistency: Diacritics and stylistic alternates automatically inherit the spacing of their base characters, ensuring uniform rhythm across various languages.
- Smaller File Sizes: OpenType fonts utilize GPOS (Glyph Positioning) tables. Storing class-to-class rules requires significantly less data than storing thousands of individual pair exceptions.
How to Set Up Kerning Classes in FontForge
Step 1: Open the Lookups Panel
- Launch FontForge and open your font file.
- Navigate to the top menu and select Element > Font
Info (or press
Ctrl+Shift+F/Cmd+Shift+F). - In the left-hand navigation list, select Lookups.
- Click on the GPOS (Glyph Positioning) tab at the top of the Lookups section.
Step 2: Create a Kerning Lookup
- Click Add Lookup.
- Set the Type dropdown to Pair Position (Glyph/Class).
- Under the Feature column, select or type
kern(Horizontal Kerning). - Click OK to save the lookup.
Step 3: Add a Class Subtable
- Select the newly created
kernlookup in the list. - Click Add Subtable.
- In the setup window that appears, ensure the kerning method is set to Class to Class or Kerning by Classes.
- Click OK. This opens the Kerning Class definition window.
Step 4: Define the Glyph Classes
The kerning window splits characters into First Class (the left glyph in a pair) and Second Class (the right glyph in a pair):
- Create the First Class: Click Add
Class under the First Class list. Type the glyph names
separated by spaces (for example:
A Aacute Agrave Acircumflex Atilde). - Create the Second Class: Click Add
Class under the Second Class list. Type the glyph names you
want to kern against the first group (for example:
V W Y). - Repeat this process for all common shapes (such as
O,C,G,Qfor round shapes, andH,I,Nfor vertical stems).
Step 5: Adjust Kerning Values
- Once your classes are defined, select a class from the first list and a class from the second list.
- Enter an offset value directly in the adjustment field (negative values pull glyphs closer together; positive values push them apart).
- Alternatively, click Kerning Window or adjust the values dynamically via FontForge's visual Metrics Window (Metrics > New Metrics Window), where changes made to any class member will automatically update the entire class across the font.
Step 6: Save and Generate
- Click OK to commit the classes and close the subtable editor.
- Click OK in the Font Info dialog.
- Save your project file (
.sfd), then regenerate your font (File > Generate Fonts) to test your new class-based kerning rules in a text editor or web browser.