How to Find Conflicting Kerning Rules in FontForge
Conflicting kerning rules in FontForge typically arise when glyphs are assigned to multiple overlapping kerning classes, when individual glyph-to-glyph pairs conflict with class rules, or when lookup subtable orders cause unexpected overrides. This guide walks you through detecting these issues by auditing GPOS lookup tables, running FontForge's built-in problem validation tools, and checking class-based definitions.
Check Kerning Classes for Overlapping Glyphs
The most common source of kerning conflicts is a glyph assigned to more than one class within the same kerning lookup.
- Go to Element > Font Info.
- Select Lookups from the left-hand navigation, then open the GPOS tab.
- Locate your kerning feature (usually named
kernHorizontal Kerning) and expand it to see its subtables. - Select the class-based kerning subtable and click Edit Data.
- Inspect the first and second glyph classes. FontForge generally warns you if a glyph appears in multiple classes within the same subtable upon saving, but you can manually review the lists to ensure no base character or variant appears in multiple sets.
Use the Validation Tool
FontForge contains an automated diagnostics tool that flags duplicate or invalid lookup references.
- Navigate to Element > Validation > Find Problems.
- Go to the Kern / Classes or OpenType tabs (depending on your FontForge version).
- Check the options for checking overlapping classes, duplicate kerning pairs, and invalid glyph references.
- Click OK to run the scan. If FontForge detects conflicts, it will list the affected glyphs and lookup entries.
Check Lookup Precedence (Glyph vs. Class)
OpenType engines evaluate lookups in sequential order. If you have both glyph-to-glyph kerning and class-to-class kerning, they can conflict if ordered incorrectly.
- Return to Element > Font Info > Lookups > GPOS.
- Check the order of your subtables. As a standard practice, specific glyph-to-glyph subtables should be placed before general class-to-class subtables if they are intended to override default class values.
- If an individual pair is placed after a class table, the layout engine may ignore your manual adjustment. Use the Up and Down buttons to rearrange subtables so specific exceptions take priority.
Test in the Metrics Window
To confirm which rule is being applied to a problematic pair:
- Open Metrics > New Metrics Window.
- Type the character sequence causing issues.
- Observe the kerning value applied between the two glyphs.
- Select the kerning field between the characters to see which lookup and subtable generated the kerning offset. If the value does not match your intended rule, a competing rule earlier in the lookup chain is executing first.