Zach’s ugly mug (his face) Zach Leatherman

The Font Loading Checklist

August 30, 2018 #18 Popular

When I look back at the last four years that I’ve spent learning everything I could about web fonts and how web fonts load, I can distill it all down to a small checklist of ideals that I continue to chase. Our goal as web developers is to maximize the experience and raise user expectations to the level of what the web is capable of delivering, but also to manage our performance budgets to ensure that we are fulfilling the promise of the web—it’s ubiquity. This checklist should help you deliver on those two often competing ideals.

The Font Loading Checklist

(Start a Web Font load)

Web fonts don’t start downloading until they’re found to be used in content, so it’s often late in the page load. We need to tell the browser to start downloading our high priority web fonts sooner.

(Behavior while a Web Font is loading)

This means absolutely no invisible text. This is known as the flash of invisible text, or FOIT. We can use flash of unstyled text (FOUT) strategies to prioritize system fonts during web font load.

(Reduce Web Font load time)

Guess what: Smaller file downloads finish sooner.

  • Strategy: Use WOFF2 formats (compression built in)
  • Strategy: Subset your fonts, if language and licensing requirements allow.

Check out Glyphhanger to help with both of these strategies.

(Behavior after a Web Font has loaded)

Each independent @font-face block has its own loading life-cycle. Its own FOIT, its own FOUT, its own repaint and reflow. When using two or more web fonts for a single family, its important to group the repaints together to reduce reflow of text on your page.


< Newer
The Problem with font-display and Reflow
Older >
TalkScript Episode #14

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at IndieWeb Avatar for https://fontawesome.com/Font Awesome and the creator/maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 84 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of CloudCannon, Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

9 Reposts

Jeremy KeithRey van den Berg沖 良矢|世路庵IndieWeb Avatar for https://www.seleqt.netIndieWeb Avatar for https://guidetraffic.netIndieWeb Avatar for https://speckyboy.comIndieWeb Avatar for https://flmarket.ruIndieWeb Avatar for https://speckyboy.comIndieWeb Avatar for https://www.inarvis.com

7 Likes

laim 🎃Lee RobinsonAndy BellJody DonettiLachlan CampbellMaëligZell Liew 🤗
7 Comments
  1. Zell Liew 🤗

    Let me do what I do best here: Make scary things approachable and friendly :) @zachleat Ok with viewing a preview (when I'm done) before I release the post to the public?

  2. Zach Leatherman (away)

    (sounds good!)

  3. Lee Robinson

    Thank you for your posts on web fonts 🙏 They really helped me learn and understand all the tradeoffs.

  4. Zach Leatherman

    Yay! I’m really glad to see someone picking up the torch there 🏆

  5. Zach Leatherman

    this is the best advice I can give you: zachleat.com/web/font-check…

  6. laim 🎃

    I've done none of these so, great starting point. 🤣 Thanks Zach <3

  7. Zach Leatherman

    haha

Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)