demo · v140
Axis Range Demo
One variable font file, five named faces with different axis pins baked into @font-face. The slider generates a live @font-face rule. Compare direct font-weight interpolation against a pinned font-variation-settings descriptor.
Five faces from one font file — each @font-face pins a different wght
Width axis: condensed vs. expanded
Live @font-face editor — drag to pin wght axis
The quick brown fox jumps over the lazy dog
@font-face { ... }
font-weight: 700 — browser interpolation
Hamburgefons
Browser picks the nearest weight from what the variable font offers. May differ between browsers.
font-variation-settings: "wght" 700 in @font-face
Hamburgefons
Axis position is exact and deterministic — the same number renders identically across browsers.
Why use @font-face font-variation-settings?
- Prevents FOUT flickering when axis transitions happen during load
- One declaration covers every selector that uses the family name
- Deterministic axis positions across all browsers — no interpolation surprises
- Pin a private axis (MONO, CASL, etc.) that has no font-* shorthand equivalent
/* Five faces from one file — each @font-face pins a different wght */
@font-face {
font-family: "RecursiveThin";
src: url("recursive.woff2") format("woff2");
font-variation-settings: "wght" 100; /* baked in Chrome 140+ */
}
@font-face {
font-family: "RecursiveBold";
src: url("recursive.woff2") format("woff2");
font-variation-settings: "wght" 700;
}
/* Usage: just set font-family, the weight is already baked */
h1 { font-family: "RecursiveBold"; }
p { font-family: "RecursiveThin"; }
see also
- Support font-variation-settings descriptor in @font-face rule — feature index
- @font-face FVS — multi-axis slider
- Family Variants — one file, many names
- ChromeStatus entry
- CSS Fonts Level 4 spec