How to Adjust Cap Height and X-Height in FontForge
Adjusting the cap height and x-height in FontForge involves updating the font's OS/2 metric tables to ensure operating systems render text lines correctly, as well as setting horizontal guide lines for precise visual design. This guide provides clear, step-by-step instructions to configure both the internal font metadata and the visual workspace guides.
Step 1: Open Font Info
- Launch FontForge and open your font file (
.sfd,.otf, or.ttf). - Click on the Element menu in the top navigation bar.
- Select Font Info from the dropdown menu (or press
Ctrl + Shift + Fon Windows/Linux,Cmd + Shift + Fon macOS).
Step 2: Set Metric Parameters in the OS/2 Table
The actual standard parameters used by rendering engines and applications are stored in the OS/2 table:
- In the Font Info window, look at the sidebar on the left and click on OS/2.
- Select the Metrics sub-tab at the top of the pane.
- Locate the X-Height and Cap Height
input fields:
- X-Height: Enter the vertical height (in font design units) from the baseline to the top of standard flat lowercase letters like "x", "v", or "z".
- Cap Height: Enter the vertical height from the baseline to the top of flat uppercase letters like "H", "I", or "E".
- If you want FontForge to determine these values automatically based on your existing glyphs, click the Compute button next to each field (if available in your build) or check the automatic calculation options.
- Click OK at the bottom of the window to apply and save your changes.
Step 3: Add Visual Guide Lines (Optional but Recommended)
Updating the OS/2 table sets the metadata, but you should also add visual guidelines in the glyph editing window to help draw consistent shapes.
- Double-click any glyph (such as "x" or "H") in the main font view to open the Glyph Editing window.
- Ensure the horizontal ruler is visible at the top (toggle via View > Rulers if hidden).
- Click on the top horizontal ruler and drag a guideline downward onto the canvas.
- Release the mouse button near the intended height.
- Right-click the guideline and select Get Info (or double-click the guideline).
- In the dialog box, set the exact vertical position:
- Enter your desired Cap Height value in the Y field and click OK.
- Drag a second guide and enter your X-Height value in the Y field.
- To make these guides appear across all glyphs, right-click the guideline, open its properties, and set it to the Guide layer rather than a local layer.