Variable & Dynamic Fonts
OpenType Variable Font (fvar/gvar)
OpenType Variable Fonts store interpolation deltas in fvar, gvar/CFF2, and avar tables so one font file renders every weight from Thin 100 to Black 900 seamlessly.
Strengths
- Replaces 6–12 separate static weight files with a single HTTP request when multiple weights are needed
- Enables fluid weight transitions and CSS font-variation-settings animations
- Can be trimmed with HarfBuzz to keep only needed axis ranges (e.g. wght 400–700) or pinned to static
Trade-offs
- Larger than a single static weight if your page only renders 400 Regular
- Legacy software, older printers, and some game UI tools require pinned static TTF/OTF instances
Convert & optimize Variable Font locally
Related engineering guides
All 18 guidesZero Layout Shift Web Fonts: Calculating size-adjust & ascent-override
Eliminate Cumulative Layout Shift (CLS) on web font swap using exact OS/2 vs hhea formulas for size-adjust, ascent-override, and descent-override.
Self-Hosting Google Fonts for GDPR Compliance & Zero Third-Party Requests
Eliminate external fonts.googleapis.com requests for European GDPR compliance by packing local WOFF2 fonts, @font-face CSS, and CLS fallbacks.
Variable Fonts: Static Weight Instancing vs. Trimming Axis Ranges
Use HarfBuzz WASM in your browser to pin Variable Font axes (wght/wdth) into lightweight static weights or trim axis spans without Python fonttools.
Renaming Font Families: OpenType name Table IDs & Checksum Hygiene
Edit OpenType nameID 1, 2, 4, 6, 16, and 17 metadata locally to fix Windows and macOS weight conflicts and update head checksums cleanly.
Variable Font frequently asked questions
When should I pin a Variable Font to static instead of shipping it whole?
If your site only uses Regular (400) and Bold (700), pinning static instances or trimming the axis range with HarfBuzz often saves 40%–70% of bytes.
What OpenType tables power Variable Fonts?
Axis definitions live in fvar, coordinate mapping in avar, outline deltas in gvar (TrueType) or CFF2, and metric deltas in HVAR/MVAR.
Can variable fonts also be character-subsetted?
Yes. HarfBuzz subsetter preserves fvar/gvar deltas for retained glyphs while stripping unused Unicode codepoints and axis spans.