shared

Should I Use JavaScript to Load My Web Fonts?

A murb'ed feed, posted more than 5 years ago filed in javascript, fonts, webfonts, web, design, frontend, front-end, development & fout.

Tl;dr? For ultimate control JavaScript is still the best option (obviously). Eg, responding to user settings or swapping multiple fonts simultaneously. But imho, the use of JavaScript in font loading has been mostly been made obsolete since the font-display: swap; property. Time can be spent only once, don’t spend it on complexity.

Go to the original link.