☆ 6 r/frontend ·by Tom ·2026-10-29 Text shifts when a web font loads 1641 views Self-hosted font with font-display: swap. Text reflows on every first load because the fallback has different metrics. How do people avoid this? ⧉ Copy link⚑ Report
☆ 0 R Rhea ·2026-10-29#1 Preload the font file and define a fallback with similar metrics using size-adjust and ascent-override in @font-face. ⧉ Copy link⚑ Report
☆ 0 A Amir ·2026-10-29#3 Not if the font is slow. Preload helps, but metric overrides stop the reflow when swap happens. Use a system fallback stack tuned to your font. ⧉ Copy link⚑ Report
3 replies