Understanding Em Square Dimensions in FontForge
In digital typography, the em square serves as the fundamental design grid upon which all glyphs are constructed and scaled. In FontForge, configuring the em square dimensions establishes the relative coordinate space for your font, directly controlling how glyph coordinates, baseline placement, vertical metrics, and cross-platform line spacing are calculated. This guide explains what the em square represents in FontForge, how it functions within the metrics system, and why choosing the correct unit values is critical for font development.
The Em Square Concept
The term "em" originates from traditional metal typesetting, referring to the physical metal block containing the letter "M," which was cast on a square body equal to the point size of the font. In digital font design tools like FontForge, the em square is an abstract, two-dimensional Cartesian coordinate space.
All outlines, control points, and kerning pairs drawn within FontForge are stored as dimensionless relative coordinates inside this space. When a text engine displays a 16-point font, it scales the internal em square to fit 16 points on the screen or printed page.
Em Square Metrics in FontForge
In FontForge, the em square is configured under Element > Font Info > General. It is defined mathematically by two primary values:
- Ascent: The number of units above the baseline (y = 0).
- Descent: The number of units below the baseline.
The total em size—commonly referred to as Units Per Em (UPM)—is always the sum of the ascent and the descent:
\[\text{Em Size} = \text{Ascent} + \text{Descent}\]
For example, a standard configuration might assign an ascent of 800 units and a descent of 200 units, resulting in a total em size of 1000 units. The baseline sits at \(y = 0\), dividing the em square into positive values above and negative values below.
Standard Em Values: 1000 vs. 2048
Depending on the intended format of your font, standard conventions dictate the em square size:
- 1000 UPM (PostScript / CFF / OpenType): Historically used for Type 1 and OpenType-CFF fonts. Decimal measurements are intuitive to calculate (e.g., 100 units equals exactly 10% of the point size).
- 2048 UPM (TrueType): Standard for TrueType fonts. Powers of two (such as \(2^{11} = 2048\)) allow rasterizers to execute binary division operations rapidly, which was historically vital for performance and grid-fitting (hinting).
While modern operating systems can handle arbitrary em sizes, using standard values like 1000 or 2048 prevents rendering inconsistencies, rounding errors during format conversions, and potential rasterization bugs in legacy applications.
Impact on Vertical Metrics and Line Height
The em square defines the scale of the design grid, but operating systems reference specific vertical metrics tables to calculate line heights and detect clipping bounds:
- OS/2 Table (Typo Metrics and Windows Metrics):
TypoAscender,TypoDescender, andTypoLineGapdictate layout spacing in modern publishing and web applications. Ideally,TypoAscender - TypoDescender = Em Size.WinAscentandWinDescentdefine the clipping boundary on Windows. If glyphs extend beyond these values relative to the em square, Windows may cut off the tops of tall diacritics or descenders.
- hhea Table (Mac Metrics):
- The
Ascender,Descender, andLineGapvalues control line-to-line spacing on macOS and iOS systems.
- The
If the em square is changed in FontForge without recalculating these vertical metrics, the font may render with excessive vertical whitespace or severe clipping across different browsers and operating systems.
Rescaling the Em Square
Modifying the em size in FontForge requires caution. If you alter the em value in the Font Info dialog, FontForge provides an option to scale all glyph outlines proportionally.
- With Scaling Enabled: FontForge multiplies all coordinate points by the ratio of the new em size to the old em size, preserving the visual proportions of the glyphs relative to text sizes.
- Without Scaling: The existing coordinate points remain unchanged, making the glyphs appear physically smaller or larger relative to the newly defined em boundary, which alters weight, proportions, and vertical spacing.