How to inspect opentype features programmatically in ci
- Step 1Walk fonts directory — fs.readdir(input). For each font, parse with opentype.js, walk GSUB.features and GPOS.features, collect tag set.
- Step 2Compare against required set — Maintain font-features.required.json: { 'Inter-Regular.woff2': ['kern', 'liga', 'calt', 'tnum', 'ss01'] }. Build fails if any required feature is missing.
- Step 3Document exceptions — When a font drops a feature legitimately (foundry simplifies), update the required.json in the same PR. Forces explicit acknowledgement of design impact.
Frequently asked questions
Are some features always present?+
kern is universal in modern fonts (or at least the GPOS pair-pos lookup). liga is in 99% of Latin fonts. calt is common in modern OpenType. Beyond these, feature support varies wildly by font — pin requirements per font.
What if my design system doesn't use a feature but the foundry includes it?+
Extra features don't hurt — file size impact is small. The check is for missing required features, not unexpected extras.
Can I lint feature usage in CSS?+
Yes — extend the script to grep CSS for font-feature-settings tags and verify each is present in every font that could be the active typeface for that selector. More complex; useful for very large design systems.
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.