Performance: Font family
MEDIUM IMPACT
Font family affects page load speed and rendering performance by determining which font files the browser must download and how text is painted.
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }body { font-family: 'CustomFont1', 'CustomFont2', 'CustomFont3', serif; }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple custom fonts | No extra DOM nodes | 1 reflow after font load | High paint cost due to font glyph rendering | [X] Bad |
| System font stack | No extra DOM nodes | No reflows from font load | Low paint cost, uses native fonts | [OK] Good |