FontForge Proportional vs Monospaced Metrics

FontForge handles proportional and monospaced font metrics by altering how advance widths, side bearings, kerning, and metadata flags are assigned across a typeface. While proportional fonts rely on individual, visually balanced character widths and dynamic pair adjustments, monospaced fonts require strict, uniform horizontal spacing enforced by specific font tables. Understanding how FontForge manages these distinct paradigms is essential for producing correctly spaced typography.

Managing Proportional Font Metrics

In a proportional font, every glyph has a unique advance width determined by its visual weight and contour design. FontForge provides dynamic tools to manage these variable distances:

  • Advance Widths and Side Bearings: You can adjust the Left Side Bearing (LSB) and Right Side Bearing (RSB) for each glyph individually in the Glyph Window or interactively in the Metrics Window (Metrics > Open Metrics Window). The total advance width is the sum of the LSB, the glyph outline width, and the RSB.
  • Auto-Spacing: FontForge includes an automated spacing algorithm (Metrics > Auto Width) that analyzes glyph contours and calculates optical side bearings to balance whitespace across the character set.
  • Kerning Pairs and Features: Proportional fonts rely heavily on kerning to resolve awkward collisions (such as "AV" or "To"). FontForge handles this via OpenType features configured in Element > Font Info > Lookups. You can create GPOS lookup tables for pair-to-pair kerning or class-based kerning, allowing specific glyph combinations to override default advance widths.

Managing Monospaced Font Metrics

Monospaced fonts demand that every single glyph shares the exact same advance width. FontForge controls this through uniform numerical assignments and dedicated structural flags.

  • Setting a Global Advance Width: To establish monospaced spacing, select all glyphs in the Font View (Ctrl+A) and choose Metrics > Set Width.... Entering a fixed value (such as 500 or 600 units, depending on your Em size) assigns an identical horizontal advance across all selected glyphs.
  • Centering Glyphs: Because the advance width is fixed, characters with narrow outlines (such as "i" or ".") must be centered within the slot. FontForge allows you to center glyphs within their new widths using Metrics > Center in Width. This automatically distributes the remaining space equally between the LSB and RSB.
  • Eliminating Kerning: Monospaced typefaces generally do not use kerning. Any existing horizontal kerning lookups in Element > Font Info > Lookups must be removed to prevent software from altering character cell widths.

Monospaced Flags and Font Tables

Setting identical advance widths is not enough for an operating system to classify a font as monospaced. FontForge requires specific metadata to be toggled:

  1. PostScript Properties: In Element > Font Info > PostScript, check the isFixedPitch box. This sets the Boolean flag that tells rendering engines the font has uniform metrics.
  2. PANOSE Classification: In Element > Font Info > OS/2 > PANOSE, set the Proportion dropdown menu to Monospaced.
  3. TrueType/OpenType Tables: When generating the font, FontForge sets the hhea (Horizontal Header) and OS/2 table values—such as xAvgCharWidth and maxAdvanceWidth—to match the uniform width, ensuring terminal emulators and code editors render the font correctly on a strict grid.

Validating Metrics

FontForge includes a verification tool to ensure consistency. By opening Element > Find Problems and navigating to the Spacing / Kerning tab, you can test whether any glyphs deviate from the required advance width. This helps catch unassigned widths, accents, or hidden non-spacing characters before generating the final font binary.