Set Ascender and Descender Metrics in FontForge
FontForge gives you full control over a font's vertical metrics, including the ascender, descender, and line gap values. Setting these metrics properly is essential for ensuring your font displays at a consistent size and without unwanted text clipping across various operating systems, web browsers, and desktop publishing applications. This guide explains exactly where to find and how to adjust these vertical metrics within FontForge.
Accessing the Font Info Window
All vertical metric configurations in FontForge are located in the Font Info dialog.
- Open your font project in FontForge.
- Navigate to the top menu and select Element >
Font Info (or press
Ctrl+Shift+Fon Windows/Linux,Cmd+Shift+Fon macOS).
Configuring General Metrics (Em Square)
The fundamental baseline for your font's dimensions is determined in the General category on the left sidebar:
- Click on General.
- Locate the Ascent and Descent fields.
- Enter your desired values. By default, standard digital fonts use an Em Size of 1000 units (common for PostScript/OTF) or 2048 units (common for TrueType/TTF). The sum of your Ascent and Descent must equal the total Em Size. For example, a 1000-unit Em font often uses an Ascent of 800 and a Descent of 200.
Configuring OS/2 and Windows Metrics
Operating systems handle line spacing and vertical bounds differently. To avoid clipping and inconsistent line heights, you must adjust the OpenType OS/2 table:
- In the Font Info window, select the OS/2 category from the sidebar.
- Switch to the Metrics sub-tab at the top.
- Configure the following values:
- Win Ascent and Win Descent: These values define the clipping boundaries in Windows. If a glyph extends beyond these values, it may be visually cut off. Set these high enough to encompass your tallest accents and lowest descenders.
- Typo Ascent and Typo Descent: These values control the intended typographic line spacing across modern applications. Typically, these match your base Ascent and Descent values from the General tab.
- Typo Line Gap: The extra vertical space added
between lines of text. Setting this to
0allows the application to rely strictly on the Typo Ascent and Typo Descent.
- Check or uncheck Is Offset according to your preference. Leaving it unchecked allows you to specify absolute values directly.
Configuring Apple (hhea) Metrics
macOS relies on the horizontal header table (hhea) to
determine vertical metrics:
- In the Font Info window, open the General or look under the metrics options for the hhea table (depending on your FontForge version, this is often synced directly or found under the OS/2 / Mac metrics sections).
- Ensure the Hhea Ascent, Hhea
Descent, and Hhea Line Gap values align with
your typographic intentions. For consistent cross-platform line spacing,
make sure the
hheavalues mirror yourTypovalues (with Hhea Descent entered as a negative number).
Saving Your Changes
Once you have entered your vertical metric values:
- Click OK at the bottom of the Font Info dialog.
- Save your FontForge source file (
.sfd). - Re-generate your font files (File > Generate Fonts) to apply the updated metrics to your finalized OTF or TTF binaries.