Load web fonts fast without layout shift

8 steps · about 1 h 50 min · Beginner

  1. How fonts affect page speed (tutorial, web.dev, 20 min)

    Start with the loading problem itself: why fonts delay text, and which choices change it.

  2. Declare fonts with @font-face (reference, MDN Web Docs, 15 min)

    Learn each descriptor you will set, and serve WOFF2 files with the right weights and styles.

  3. Pick a font-display value (reference, MDN Web Docs, 10 min)

    Decide per font whether invisible text, a fallback swap or an optional font gives readers the best first view.

  4. Preload only the fonts above the fold (reference, MDN Web Docs, 10 min)

    Fetch the one or two fonts used in the first screen early, and learn the crossorigin detail that otherwise downloads them twice.

  5. Split fonts by character range (reference, MDN Web Docs, 10 min)

    Let the browser download only the subsets a page actually uses, which matters most for multilingual sites.

  6. Match fallback size with size-adjust (reference, MDN Web Docs, 10 min)

    Scale the fallback font so lines wrap the same way before and after the web font loads.

  7. Tune fallback metrics to remove the jump (article, Chrome for Developers, 15 min)

    Combine size-adjust with ascent and descent overrides and measure the layout shift that remains.

  8. Review your fonts against a checklist (article, web.dev, 20 min)

    Finish by auditing a real page: number of files, formats, inlined declarations and caching.