How to automate font metadata extraction in ci
- Step 1Walk fonts directory — fs.readdir(input). For each font, parse with opentype.js, dump font.names, font.tables.os2, font.tables.head, font.tables.hhea.
- Step 2Format as JSON — Per-font output: { filename, version, manufacturer, designer, licence, licenceUrl, vendorID, sha256, timestamp }. Write to dist/audit/<font>.json.
- Step 3CI compare step — Before deploy, diff dist/audit/ against committed audit/. Differences require explicit acknowledgement (a PR comment or commit message confirming the version bump was intentional).
Frequently asked questions
Should I commit audit JSON?+
Yes. The audit files act as a manifest — what fonts shipped, at what versions, with what licences. Useful for compliance reviews months or years after the fact.
Does this catch drift in third-party fonts?+
Yes — third-party fonts (Google Fonts, Adobe Fonts, fontshare) can change without notice. Re-running extraction at build time catches the drift; CI flags it for review.
What about variable fonts?+
Variable fonts have all the same name records as static fonts plus axis names (nameID 256+). The extractor surfaces these too — useful for axis documentation.
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.