FontForge Non-Integral Coordinates Warning Explained
FontForge flags non-integral coordinates as a warning primarily because traditional font formats, rendering engines, and hinting mechanisms rely on discrete integer grids. When glyph points or control handles possess fractional coordinates rather than whole numbers, it can lead to rasterization artifacts, compilation errors, and unexpected curve distortions when the font is exported.
Font Format Specifications
Standard font outline formats, notably TrueType and older PostScript
Type 1/CFF outlines, were engineered to store outline coordinates
strictly as whole integers. While modern formats like CFF2 support
fractional numbers, the baseline OpenType specification—specifically the
TrueType glyf table—stores coordinate deltas as integers.
FontForge warns designers of non-integral coordinates because working
outside a whole-number grid breaks compatibility with these widespread,
foundational font specifications.
Automatic Rounding and Shape Distortion
When a font containing fractional coordinates is exported to an integer-only format, the compiler must automatically round those values to the nearest whole integer. This automatic rounding frequently alters the geometry of the glyph:
- Broken Tangencies: Smooth connections between curve points and their control handles can shift slightly, creating unintended kinks or sharp corners.
- Shifted Extrema: The outermost points of a curve (top, bottom, left, right) may shift off their exact axes.
- Stem Inconsistencies: Parallel stems designed to have the exact same width might end up differing by a full unit depending on whether their boundaries rounded up or down.
Hinting and Rasterization Problems
Rasterizers convert vector outlines into pixels on physical displays. Font hinting instructions rely heavily on a clean, predictable coordinate grid to snap stems, serifs, and baselines to discrete screen pixels at small point sizes. Non-integral coordinates disrupt this process, often producing asymmetrical stems, uneven baseline alignment, or blurry edges when rendered at low resolutions.
File Size Overhead
Storing decimal numbers requires more data than storing whole integers. Even in formats that technically permit floating-point values, encoding fractional coordinates increases the overall binary file size. Sticking to integers ensures compact data structures, which is critical for web font performance and fast load times.
How to Resolve the Warning
Fractional coordinates typically appear after scaling, slanting, or rotating glyph elements. To resolve the warning, select the affected glyphs in FontForge and navigate to Element > Round > To Int. This rounds all on-curve nodes and off-curve control points to the nearest integer grid points, allowing you to review and adjust the final geometry before generating the production font files.