How to enforce font glyph budgets via ci script
- Step 1Define budgets — fonts.budget.json: { 'Inter-Regular.woff2': { 'maxKB': 30, 'minCoverageBlocks': ['Latin Basic', 'Latin-1 Supplement'] } }. Per-font budget plus required coverage blocks.
- Step 2Verify on every build — CI step measures actual WOFF2 size and runs Coverage Map. Fails if size > budget or any required block has <100% coverage.
- Step 3Adjust budgets intentionally — Budget bumps require updating fonts.budget.json. Forces explicit acknowledgement of growth. Reviewers see the budget change as part of the PR.
Frequently asked questions
What's a sensible buffer above the actual size?+
10–20%. If your font is 25 KB today, set the budget at 30 KB. Catches regressions without firing on minor foundry updates.
Should I track per-version budgets?+
Optional. Keep one budget per font path. When a foundry updates, the size change shows up in CI; you decide whether to bump the budget or push back to design.
What if my CI is non-blocking?+
Many teams start with warning-only and graduate to blocking after a few sprints of clean enforcement. Set a clear 'date-X-becomes-blocking' deadline so the team knows it'll firm up.
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.