Using FontForge Add Lookup for Metrics and Spacing

In FontForge, the "Add Lookup" window serves as the primary gateway for implementing OpenType Glyph Positioning (GPOS) rules that dictate how glyphs are spaced, kerned, and positioned relative to one another. By configuring lookups through this dialog, type designers can move beyond default, static character widths to establish dynamic, context-aware typographic relationships such as pairwise kerning, contextual spacing, mark attachment, and cursive script connections.

The Role of the Add Lookup Window in GPOS

The Add Lookup window, accessible via Element > Font Info > Lookups, organizes OpenType layout tables. While the Glyph Substitution (GSUB) tab handles character replacements (like ligatures), the GPOS tab handles physical spacing and coordinate offsets.

When you add a lookup under the GPOS table, you are defining a container for specific geometric transformation rules before adding actual metrics data into subtables.

Key Metrics and Spacing Features Controlled by Add Lookup

The "Type" dropdown inside the Add Lookup window determines the mathematical and spatial logic applied to your glyphs:

1. Pairwise Positioning (Kerning)

The most common spacing application for this window is setting up horizontal pair kerning (the kern feature). Selecting Pair Adjustment allows you to:

  • Adjust the horizontal advance and placement between specific character combinations (e.g., tightening the gap between "A" and "V").
  • Create Kerning by Classes, which groups similar shapes (like 'O', 'C', and 'G') to share identical spacing offsets, drastically reducing font file size and production time.

2. Single Dimension Adjustments

Choosing Single Adjustment allows you to alter the horizontal advance, vertical advance, or X/Y placement of individual glyphs. This is used to adjust the spacing of particular symbols under specific OpenType feature tags without permanently altering the base metric values in the main font grid.

3. Contextual and Chained Context Positioning

These advanced lookups allow you to alter spacing based on adjacent glyphs. For example, if a specific sequence of three glyphs causes awkward collisions, a contextual lookup can selectively widen or tighten the spacing between the outer characters only when the middle character is present.

4. Mark-to-Base and Mark-to-Mark Positioning

Metrics involve more than horizontal sidebearings; they also encompass vertical and diacritic alignment. The Add Lookup window lets you configure:

  • Mark to Base: Attaches diacritics (accents) to base characters at defined anchor points rather than manually compositing each accented character.
  • Mark to Mark: Positions stacked accents correctly above or below other accents.

5. Cursive Attachment

For connected scripts like Arabic, Urdu, or continuous script lettering, the cursive attachment lookup defines entry and exit anchor points on glyphs. This ensures glyphs join seamlessly along a baseline, even across varying line heights and widths.

Essential Settings in the Window

When creating a metric lookup, the window requires three primary configurations:

  • Type: The positioning mechanism (e.g., Pair Adjustment, Single Adjustment).
  • Feature: The standardized four-letter OpenType feature tag (such as kern for standard kerning, calt for contextual alternatives, or mark for mark positioning).
  • Script and Language: Defines which writing systems execute the spacing rule. A lookup can be applied globally to default scripts or restricted to specific alphabets (Latin, Cyrillic, Greek, etc.).
  • Lookup Flags: Controls how the positioning engine handles whitespace, base glyphs, and mark glyphs during spacing calculations (such as ignoring marks during kerning passes).

Once the lookup is established in the Add Lookup window, you can add "Subtables," where the actual numerical offset values, classes, and anchor coordinates are input.