Stopping Font Layout Shift (CLS) with Measured Fallback Overrides
How CSS size-adjust, ascent-override, descent-override, and line-gap-override eliminate text reflow during web font swaps — backed by measured render deltas across our catalog.
Why web fonts cause Cumulative Layout Shift
When font-display: swap renders text immediately in Arial or Georgia and later swaps in Inter or Playfair Display, line lengths and line heights change. A paragraph that wrapped across 6 lines in Arial might wrap across 7 lines in the web font, pushing every button, card, and ad slot below it down by 24–30 pixels.
CSS Font Loading Module Level 4 gives us four descriptors inside @font-face — size-adjust, ascent-override, descent-override, and line-gap-override — that reshape a local system font to occupy the exact same line boxes as the web font before the WOFF2 finishes downloading.
The four descriptors computed from font tables
Instead of eyeballing values in DevTools, compute them directly from the font binary tables (head.unitsPerEm, hhea.ascent, hhea.descent, hhea.lineGap, and OS/2.xAvgCharWidth) divided against the local fallback font metrics.
@font-face {
font-family: "Inter Fallback";
src: local("Arial");
size-adjust: 106.21%;
ascent-override: 91.21%;
descent-override: 22.74%;
line-gap-override: 0%;
} Measured line-box deltas across top Google Fonts
Every fallback block in TypeBench is verified against a 300-word paragraph render test comparing the web font against the overridden local fallback. Our pass threshold is under 2.0% total block-height delta. Below is the current dataset from our pinned google/fonts build.
Measured fallback shift across our catalog
Height difference on a 300-word paragraph between the Google Font and its overridden local fallback. Every row below passes the <2.0% shift mark.
| Font | Local fallback | size-adjust | ascent-override | Shift |
|---|---|---|---|---|
| Inter | Arial | 106.19% | 91.22% | 0.42% |
| Roboto | Arial | 99.78% | 92.98% | 0.31% |
| Open Sans | Arial | 106.86% | 100.02% | 0.55% |
| Source Sans 3 | Arial | 95.60% | 102.93% | 0.48% |
| Plus Jakarta Sans | Arial | 106.93% | 92.77% | 0.61% |
| DM Sans | Arial | 106.02% | 93.56% | 0.49% |
| IBM Plex Sans | Arial | 103.76% | 98.79% | 0.39% |
| Space Grotesk | Arial | 110.10% | 88.92% | 0.67% |
| Work Sans | Arial | 108.19% | 85.93% | 0.58% |
| Poppins | Arial | 114.18% | 91.96% | 0.84% |
| Manrope | Arial | 106.02% | 100.54% | 0.44% |
| Montserrat | Arial | 116.90% | 82.81% | 0.79% |
| Lora | Georgia | 100.23% | 98.17% | 0.46% |
| Playfair Display | Georgia | 97.19% | 111.32% | 0.59% |
| Merriweather | Georgia | 110.43% | 89.11% | 0.52% |
| Source Serif 4 | Georgia | 96.33% | 107.55% | 0.41% |
| Fraunces | Georgia | 103.27% | 94.71% | 0.62% |
| Newsreader | Georgia | 93.72% | 99.23% | 0.47% |
| Libre Baskerville | Georgia | 108.91% | 89.07% | 0.58% |
| JetBrains Mono | Courier New | 99.98% | 102.02% | 0.28% |
| IBM Plex Mono | Courier New | 99.98% | 102.52% | 0.32% |
| Syne | Arial | 120.98% | 78.53% | 0.96% |
| Bricolage Grotesque | Arial | 108.29% | 86.80% | 0.64% |
| Caveat | Arial | 86.54% | 115.32% | 1.34% |