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

  1. Launch FontForge and open your font file.
  2. Navigate to the top menu and select Element > Font Info (or press Ctrl+Shift+F / Cmd+Shift+F).
  3. In the left-hand navigation list, select Lookups.
  4. Click on the GPOS (Glyph Positioning) tab at the top of the Lookups section.

Step 2: Create a Kerning Lookup

  1. Click Add Lookup.
  2. Set the Type dropdown to Pair Position (Glyph/Class).
  3. Under the Feature column, select or type kern (Horizontal Kerning).
  4. Click OK to save the lookup.

Step 3: Add a Class Subtable

  1. Select the newly created kern lookup in the list.
  2. Click Add Subtable.
  3. In the setup window that appears, ensure the kerning method is set to Class to Class or Kerning by Classes.
  4. 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):

  1. 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).
  2. 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).
  3. Repeat this process for all common shapes (such as O, C, G, Q for round shapes, and H, I, N for vertical stems).

Step 5: Adjust Kerning Values

  1. Once your classes are defined, select a class from the first list and a class from the second list.
  2. Enter an offset value directly in the adjustment field (negative values pull glyphs closer together; positive values push them apart).
  3. 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

  1. Click OK to commit the classes and close the subtable editor.
  2. Click OK in the Font Info dialog.
  3. 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.