Zach’s ugly mug (his face)

Zach Leatherman

Should I Use JavaScript to Load My Web Fonts?

30 Nov 2018 Zach Leatherman

Read Should I Use JavaScript to Load My Web Fonts? on the Filament Group Lab.

When they were first introduced, web fonts were primarily a CSS feature, and for many web developers they’ve always loaded them using CSS (and nothing more). But in the last decade, default web font loading behavior in many browsers made CSS-only methods a gamble with our page’s text render, and thoughtful developers switched to safer JavaScript methods. Recently, browser support for new and safer CSS-only strategies have left some developers wondering: are JavaScript methods to load web fonts necessary? Are they useful? Let’s dig in.