Font Loading Performance Issues
What This Means
Web font loading can significantly impact page performance and user experience. Poor font loading strategies lead to:
- FOIT (Flash of Invisible Text): Text remains invisible while fonts load
- FOUT (Flash of Unstyled Text): System fonts display briefly before web fonts load
- Layout shifts: Page jumps when fonts load and metrics change
- Render blocking: Page rendering delayed waiting for fonts
- Increased LCP: Largest Contentful Paint delayed by font loading
Font loading issues affect First Contentful Paint (FCP), Largest Contentful Paint (LCP), and Cumulative Layout Shift (CLS).
How to Diagnose
Browser DevTools
- Check Network tab for font loading waterfall
- Look for fonts loaded from third-party domains (Google Fonts, Adobe Fonts)
- Monitor timing: fonts should load early, not late in the waterfall
- Check for multiple font weights/styles (each is a separate request)
Performance Panel
- Look for layout shifts when fonts load
- Check FCP and LCP timing relative to font loading
- Identify if fonts are render-blocking
Common Issues
- Too many font variants loading (multiple weights/styles)
- Fonts not preloaded for critical text
- Missing
font-displaydescriptor - No font fallback strategy
- Self-hosted fonts not optimized
General Fixes
Use font-display: swap - Prevent FOIT by showing fallback fonts immediately
@font-face { font-family: 'CustomFont'; src: url('/fonts/custom.woff2') format('woff2'); font-display: swap; }Preload critical fonts - Load important fonts early
<link rel="preload" href="/fonts/custom.woff2" as="font" type="font/woff2" crossorigin>Limit font variants - Only load necessary weights and styles (typically 2-3 max)
Use WOFF2 format - Modern, compressed format with best browser support
Self-host fonts - Avoid third-party requests to Google Fonts or Adobe Fonts
Optimize fallback fonts - Match metrics to reduce layout shift
font-family: 'CustomFont', Arial, sans-serif; size-adjust: 100%; ascent-override: 90%; descent-override: 22%;Use Font Loading API - Control font loading programmatically
const font = new FontFace('CustomFont', 'url(/fonts/custom.woff2)'); await font.load(); document.fonts.add(font);Subset fonts - Include only characters you need to reduce file size
Implement variable fonts - Single file with multiple weights/styles
Platform-Specific Guides
| Platform | Guide |
|---|---|
| Next.js | Font Optimization |
| Google Fonts | Optimize Google Fonts |
| WordPress | Font Loading Best Practices |
| Shopify | Font Loading Guide |