Skip to content

Finalize

finalize

Prepare FontForge's output for ttfautohint and release (run with uv).

Removes FontForge artifacts and old hinting tables, writes Automata Mono's names, and restores upstream metadata that FontForge rewrites.

WINDOWS_ENGLISH = (3, 1, 1033) module-attribute

DROPPED_NAMES = (7,) module-attribute

drop_synthesized_layout(font, upstream)

Remove the GDEF and GPOS tables FontForge writes for a font without them.

Upstream has neither. FontForge's GPOS has no lookups, and its GDEF only classifies Ligaturizer's spacer glyphs as base glyphs. Such a GDEF would stop HarfBuzz from deriving mark classes from Unicode, changing how combining marks shape, so anything more than that is an error.

widen_null_glyph(font, upstream)

Give FontForge's added .null glyph the cell advance instead of zero.

Every upstream glyph shares one advance. The glyph is empty and no character maps to it; removing it would renumber every glyph ID.

sync_side_bearings(font)

Set each left side bearing to the outline's xMin.

FontForge writes stale values for composites whose components changed (the semicolon keeps the old comma's bearing) and rounds ligatures differently. TrueType rasterizers position outlines by these values.

names(style, upstream, fira)

finalize(args)

parse_args()