How to Check Zero Advance Width in FontForge

Checking whether a glyph has an advance width of zero in FontForge is essential when designing combining accents, non-spacing marks, or hidden control characters. This guide explains how to quickly identify zero-width glyphs using the graphical interface through the Outline window, the Metrics view, the Set Width dialog, and automatically across an entire font using FontForge's built-in Python scripting.

Method 1: Check via the Outline Editing Window

  1. Double-click the glyph in the main font view to open the Outline Editing window.
  2. Observe the vertical guidelines:
    • The solid vertical line at the origin (\(x = 0\)) represents the left side bearing.
    • The dashed vertical line represents the glyph's advance width.
  3. If the advance width is set to zero, the dashed line sits directly on top of the \(x = 0\) axis.

Method 2: Check via the Metrics Window

  1. In the main font view, select the glyph you want to inspect.
  2. Go to Metrics > Open Metrics Window (or press Ctrl+K on Windows/Linux, Cmd+K on macOS).
  3. Look at the data table beneath the visual display:
    • Find the row labeled Width.
    • If the value reads 0, the glyph’s advance width is zero.

Method 3: Check via the Set Width Dialog

  1. Select one or more glyphs in the main font view.
  2. Go to Metrics > Set Width....
  3. The dialog box opens showing the current width value. If the glyph has zero advance width, the input field displays 0.
  4. Click Cancel to close the dialog without altering any values.

Method 4: Check Programmatically Using Python

To quickly scan individual glyphs or locate all zero-width glyphs across an entire font, use FontForge’s built-in Python console.

  1. Open File > Execute Script....
  2. Select the Python radio button.
  3. Paste the following script and click OK:
import fontforge

font = fontforge.activeFont()

for glyph in font.glyphs():
    if glyph.width == 0:
        print(f"Zero width: {glyph.glyphname} (U+{glyph.unicode:04X})")

The script prints the name and Unicode point of every glyph in the active font that currently has an advance width of zero.