Set Custom Vertical Advance Widths in FontForge
Configuring vertical advance widths in FontForge is essential for creating fonts that support vertical writing modes, such as CJK (Chinese, Japanese, and Korean) scripts and traditional Mongolian. This guide outlines the exact process to enable vertical metrics in your font project, view vertical layouts, and define custom vertical advances (VWidth) for individual or batch glyphs.
Step 1: Enable Vertical Metrics in Font Info
Before setting vertical advance values, you must configure FontForge to support vertical metrics:
- Open your font project in FontForge.
- Navigate to the top menu and select Element > Font Info.
- In the sidebar of the Font Info dialog, click on General.
- Check the box labeled Has Vertical Metrics.
- Click OK to apply the changes.
FontForge will now compute and store vertical metrics tables
(vhea and vmtx) upon font generation.
Step 2: Switch to Vertical Layout in the Font View
To view your glyphs with their vertical baseline and advance lines:
- In the main Font View window, go to View.
- Select Vertical to toggle the display mode from horizontal to vertical.
This view displays the glyphs as they will stack top-to-bottom, showing the top origin line and the vertical advance line.
Step 3: Set Custom Vertical Advance Widths
You can assign custom vertical advances using several methods depending on your workflow:
Method A: Using the Metrics Menu (Single or Multiple Glyphs)
- Select one or more glyphs in the main Font View.
- Go to Metrics in the top menu.
- Select Set VWidth....
- Enter your desired custom vertical advance value in font units.
- Click OK.
Method B: Using the Glyph Info Window (Per Glyph)
- Right-click the desired glyph in the Font View and select
Glyph Info (or press
Ctrl+I/Cmd+I). - Go to the Size or Metrics tab.
- Locate the VWidth field and input your custom numerical value.
- Adjust the vertical origin offset if the glyph needs to be shifted relative to the top bearing.
- Click OK.
Method C: Using the Metrics Window (Visual Editing)
- Select the glyphs you want to adjust and go to Metrics > New Metrics Window.
- Change the view direction to vertical by clicking the vertical text icon in the toolbar or selecting View > Vertical.
- In the text field table at the bottom, edit the VWidth numeric cell directly.
- Alternatively, click and drag the bottom horizontal line representing the vertical advance boundary in the visual preview area.
Step 4: Verify and Export
- Test the alignment of stacked characters in the Metrics Window to verify spacing and aesthetics.
- Go to File > Generate Fonts...
to export your OpenType (
.otf) or TrueType (.ttf) font. FontForge will automatically compile your custom vertical values into the OpenTypevmtxtable.