What Does FontForge Validate Font Check?

The Validate Font command in FontForge is a diagnostic tool that scans a typeface for technical errors, geometry flaws, and specification violations before compilation. This article explains the primary tests the validation tool performs, including checks for outline integrity, coordinate precision, glyph metadata, and hinting anomalies, ensuring the resulting font file functions reliably across different operating systems and rendering engines.

Outline and Path Geometry

The validator primarily inspects the vector contours of each glyph to ensure paths conform to standard rendering rules:

  • Open Contours: Detects endpoints that are not joined. Fonts require closed loops to properly differentiate between the inside and outside of a shape.
  • Self-Intersecting Paths: Identifies contours that cross over themselves, which can cause rasterization artifacts or fail rendering in strict PostScript and TrueType environments.
  • Incorrect Path Direction: Confirms whether paths follow the required winding rules. TrueType paths require clockwise outer contours, while PostScript (CFF) paths require counter-clockwise outer contours for correct rendering.
  • Missing Extrema: Flags segments where curves reach maximum or minimum horizontal or vertical values without an explicit on-curve point, which can reduce rendering quality at small sizes.
  • Coincident and Extraneous Points: Finds duplicate points occupying the exact same coordinates or unnecessary points along straight lines that bloat file size and complicate hinting.

Coordinate Precision and Grid Alignment

Rendering engines process vector coordinates based on the font's internal grid system. The validation command checks:

  • Non-Integer Coordinates: Identifies points, control vectors, or advance widths with fractional values, which can lead to rounding errors when exporting to formats that require integer coordinates.
  • Points Too Far Off-Grid: Flags coordinates that exceed standard bounding box thresholds or standard em-square dimensions.

Glyph Names and Encoding

Proper font mapping relies on clean identification data. FontForge examines:

  • Duplicate Names: Flags instances where multiple glyphs share the same PostScript name.
  • Invalid Characters in Names: Ensures glyph names adhere to standard Adobe glyph naming conventions (avoiding spaces, illegal symbols, or excessive length).
  • Missing or Duplicate Unicode Values: Alerts you if two glyphs attempt to map to the exact same Unicode code point or if assigned encodings conflict with the font's encoding table.

References and Composite Glyphs

For fonts that construct complex characters (such as accented letters) using components:

  • Missing References: Detects composite glyphs that point to missing or deleted base glyphs.
  • Recursive References: Flags circular references where a component glyph refers back to itself, directly or indirectly, which can crash font parsers.
  • Flipped References: Identifies components that have been inverted or mirrored in a way that violates expected outline winding order.

Hinting and Technical Limits

FontForge also reviews hinting instructions and complex table limits:

  • Overlapping Hints: Checks PostScript hint regions to prevent conflicting horizontal or vertical stem definitions.
  • Limit Exceedance: Confirms that individual glyphs do not exceed maximum point counts or contour limits designated by standard TrueType or OpenType specifications.