Zach’s ugly mug (his face) Zach Leat­herman

A Collection of Web Font Loading Recipes

October 19, 2017
Pinned on GitHubweb-font-loading-recipes

A bunch of demos for different web font loading strategies. Companion to https://www.zachleat.com/web/comprehensive-webfonts/

6.8%
Age
Updated
Issues
2
6
PRs
1
1

When I originally wrote A Comprehensive Guide to Font Loading Strategies, each strategy included a link to a demo showcasing it working live. For my own maintenance and organizational sanity, I’ve cleaned these demos up a bit and moved them into their own repository on GitHub.

A couple of improvements I’ve added on top of the original code:

  • Each demo using a font loading polyfill (usually fontfaceobserver) is now paired with a native CSS Font Loading API demo. The native demos are usually easier to follow—the code is simpler and there isn’t a JavaScript library embedded in the head. As we move forward and support for the CSS Font Loading API increases, we can find more creative ways to serve web fonts to browsers that don’t support it.
  • New experiments: Strategies I’m trying out that haven’t made it into The Guide yet.
  • Failed experiments: Things I wish had worked. We can learn a lot from failures too. It’s important to document these so we don’t repeat our failures.

Hopefully this is a helpful resource for you to understand the differences between the font loading strategies. It certainly will be a helpful resource for me to stay organized moving forward.

Zach Leatherman is a builder for the web at Font Awesome and the creator of Build Awesome (née Eleventy/11ty), an award-winning open source website generator. He measures website performance with speedlify and at one point became too fixated on web fonts. He has given 86 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Learn more about Zach »