How to automate name table cleanup in your ci pipeline
- Step 1Walk fonts directory — fs.readdir(input). For each font, parse the name table, filter records by platform/encoding/language, rebuild the table, replace via the JAD replaceSfntTables helper.
- Step 2Sanity check output — Parse the result with opentype.js. Confirm the name table still has at least nameID 1 (family) and 4 (full name).
- Step 3Compose with downstream steps — Pipeline: TTF → cleaned-name TTF → unhinted TTF → WOFF2. Each step compounds savings; final output ships in /public/fonts/.
Frequently asked questions
What if the source font has no Windows English record?+
Throw a clear error rather than producing a font with no name. Some legacy fonts have only Mac platform records — the cleaner refuses to produce an output rather than silently breaking the font.
Can I keep specific languages?+
Yes — modify the language-keep list. Default keeps 0x409 only. To preserve French (0x40C) for European deployments, add it to the list. Output is slightly larger but supports your locale.
Does this affect downstream OS font installation?+
No — Windows English records cover macOS Font Book, Linux fontconfig, and Windows Fonts. Stripping other records doesn't break installation on any modern OS.
Privacy first
Every JAD Font tool runs entirely in your browser using opentype.js and the wawoff2 WASM Brotli encoder. Your fonts never leave your device — verified by zero outbound network requests during processing.