Round Coordinates to Whole Numbers in FontForge
During font design, scaling, rotating, or importing vector outlines can create points with fractional coordinates. Font formats like TrueType and OpenType generally expect outlines to align to an integer grid, making it essential to clean up point data before final production. This guide explains how to quickly snap and round fractional corner and curve coordinates to the nearest whole numbers in FontForge across individual glyphs or an entire font.
Method 1: Round an Entire Font or Multiple Glyphs
To round coordinates across multiple glyphs simultaneously from the main Font View window:
- Open your font project in FontForge.
- Select the glyphs you want to adjust. To select all glyphs in the font, press Ctrl + A (or Cmd + A on macOS).
- Open the Element menu from the top bar.
- Navigate to Round and click To Int.
FontForge will process the selected glyphs and snap all point coordinates and control points to the nearest whole integer.
Method 2: Round Within the Glyph Edit Window
If you are editing a specific character and want to clean up coordinates manually:
- Double-click the glyph to open the Outline View.
- Select the points you want to round. To adjust every point in the outline, press Ctrl + A (or Cmd + A).
- Go to the Element menu at the top.
- Select Round > To Int.
You will see the point coordinates in the coordinate display update immediately to whole values.
Method 3: Enforce Integer Coordinates Automatically
To prevent FontForge from generating fractional coordinates during manual editing:
- Go to File > Preferences.
- Select Editing under the left sidebar.
- Locate the coordinate settings and ensure that snapping behavior aligns with whole numbers.
- Verify that your font's Em Size (found in Element > Font Info > General) is set to a whole number (typically 1000 for PostScript or 1024/2048 for TrueType) to avoid continuous rounding artifacts during export.