OpenType Lookup Subtables in FontForge

In digital typography, OpenType features rely on a strict structural hierarchy to transform and position glyphs dynamically. This article explains the role of lookup subtables within FontForge, detailing how they function as the granular execution units beneath lookups. By understanding subtables, type designers can properly separate substitution types, control the order of typographic rules, manage contextual interactions, and avoid compile errors when building OpenType fonts.

The OpenType Hierarchy in FontForge

To understand subtables, it helps to view the OpenType architecture in FontForge as a three-tiered system:

  1. Features: High-level tags (such as liga for standard ligatures, smcp for small capitals, or kern for kerning) that software applications turn on or off.
  2. Lookups: Functional containers tied to features. A lookup defines a broad action, such as a Glyph Substitution (GSUB) or Glyph Positioning (GPOS) task.
  3. Subtables: The individual, concrete rule sets contained inside a lookup that perform the actual work on glyph data.

While a feature signals what typographic effect is intended, and a lookup defines how the glyphs are modified, the subtable defines which specific rules execute and how they are stored.

Enforcing OpenType Format Restrictions

The OpenType specification dictates that a single lookup cannot mix fundamentally different data formats or lookup types. For instance, a single GSUB lookup cannot combine a simple one-to-one substitution with a multiple-to-one ligature substitution in the exact same table format.

Subtables resolve this technical limitation. FontForge uses subtables to isolate distinct operations—such as Single, Multiple, Alternate, Ligature, or Contextual substitutions—within the parent lookup. Each subtable encapsulates a specific subset of glyph coverage tables, ensuring the exported font binary adheres cleanly to the OpenType specification without data corruption.

Controlling Order of Execution

In OpenType layout, the sequence of operations is deterministic. The OpenType layout engine processes lookups sequentially, and within each lookup, it evaluates subtables from top to bottom.

Lookup subtables enable type designers to set explicit priorities:

  • Rule Precedence: When two substitution or positioning rules could potentially match the same sequence of input glyphs, the rule in the earlier subtable takes precedence.
  • Stopping Behavior: For most substitution types, once a glyph matches a rule within an early subtable, the layout engine applies the replacement and moves on to the next lookup, bypassing conflicting rules in later subtables of the same lookup.
  • Contextual Evaluation: In complex scripts (such as Arabic or Indic scripts) or advanced contextual ligatures, multiple subtables let designers test for narrow, highly specific contexts first before falling back to generalized default substitutions.

Managing Kerning and File Size Optimization

Subtables play a critical role in kerning (GPOS). In FontForge, kerning can be organized either via individual glyph-to-glyph pairs or through kerning classes.

Because class-based kerning matrices can become extremely large, designers often split kerning data across multiple subtables. For example, a designer might place high-priority individual pair exceptions in the first subtable, followed by general class kerning rules in a subsequent subtable. This approach optimizes table size in the final binary and ensures that manual kerning overrides class-based defaults.

Working with Subtables in FontForge

In FontForge, subtables are managed through the Font Info > Lookups menu. Designers can:

  • Add Subtables: Create new partitions under an existing GSUB or GPOS lookup to add additional rule formats.
  • Reorder Subtables: Use the interface to shift subtables up or down, directly altering their processing priority.
  • Anchor Points and Marks: Organize mark-to-base and mark-to-mark attachment points into discrete subtables to prevent conflicting coordinate anchors across complex glyph sets.

By segregating typographic rules into distinct subtables, FontForge gives designers granular control over execution logic, prevents format errors during font generation, and ensures predictable cross-platform rendering across modern text layout engines.