Should I Use JavaScript to Load My Web Fonts?
Originally posted at: https://www.filamentgroup.com/lab/js-web-fonts.html
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.