← ClaudeAtlas

font-loading-and-performancelisted

Use when shipping webfonts — choosing formats, subsetting, preloading, setting font-display, eliminating FOUT/FOIT, or fixing layout shift (CLS) caused by font swap. Also use when fonts are slow, text is invisible on load, the page jumps when fonts arrive, or Core Web Vitals flag font-related shift.
jpoindexter/typography-skills · ★ 1 · AI & Automation · score 74
Install: claude install-skill jpoindexter/typography-skills
# Font loading and performance Webfonts are render-blocking-adjacent resources that change text metrics when they arrive. Two separate problems: **when text becomes visible**, and **whether the page moves when the font swaps**. ⚠️ **The corpus is obsolete here.** Rutter (2017) describes `font-display` as "a nascent CSS property under development" and both Rutter and Santa Maria recommend Web Font Loader. Superseded. Source-hierarchy rule 1 (browser behavior) outranks rules 4 and 8. Verify against MDN before emitting code. ## 1. When to invoke - Adding, replacing, or auditing webfonts. - FOIT (invisible text) or FOUT (unstyled flash) reported. - CLS regression traced to text. - Font payload is large, or you're choosing between static and variable files. - Self-hosting vs. a font CDN. ## 2. Required context - Which **families, weights, styles, and scripts** are genuinely used. Most sites ship far more than they render. - Whether the font is **self-hosted or third-party**. - Whether the text is **above the fold**. - The **fallback stack** and how far its metrics sit from the webfont. - Current **CLS** and whether font swap contributes. - Whether a **variable font** could replace multiple static files. ## 3. Invariant principles - **Text must never be invisible indefinitely.** A font that fails to load must not take the content with it. - **Only ship glyphs you render.** Unused weights, styles, and language ranges are pure cost. - **WOFF2 is the format.** Universall