I’d recommend “Modern” over “Best Support” these days. How to self-host Google fontsįirst, you need to get the font files to self-host. It’s minimal, but if you’re more privacy focused, it’s still something to be aware of. While the data is not as rich as you’d get from a full on analytics script, it still gives Google more information about who your visitors are.
We’ll look at service worker integration in a future article.Įarlier this year, I wrote about how I removed all tracking from my website and newsletter.īut the brilliant Laura Kalbag pointed out a vector I’d missed: Google Fonts. When combined with service workers, self-hosting fonts can result in dramatically faster load times than using Google’s CDN. Today, we’re going to learn how to self-host Google fonts instead of serving them from the Google CDN.
We’re going to dive back in to more service worker stuff soon, but in order to do so, I first need to talk about my new approach to custom typefaces on the web.