How to self-host a web font from Google Fonts
13 comments
·September 15, 2025valadaptive
I was going to wait to post this until I've finished the CLI and documentation, but this seems like a relevant time to plug my web font subsetting/self-hosting tool: https://glypht.valadaptive.dev/
It lets you pick from the Google Fonts catalog, and comes with various options for further reducing the fonts' sizes if you're as obsessed with webpage size as I am.
damieng
Even better download it, subset it then base64 encode it into your CSS for zero FOUC.
https://damieng.com/blog/2021/12/03/using-variable-webfonts-...
olivia-banks
Couldn't this increase FOUC? At least before you could load in your style-sheet before the font, but if you embed the font inside you get no styling at all until it can fetch all of the data, correct
erikpukinskis
Not if the styles + fonts are all in the <head>?
rs186
I tried to do something similar myself once but quickly gave up. I decided to just slap that line Google gave me in the web page.
I get why it is "better" -- CDN, optimized for browser blah blah. But I really wanted to host it myself, because 1) it's my website 2) I don't want every visitor to send a piece of information about themselves to Google just to get some fonts.
But apparently Google is not motivated to offer such a solution, at all.
OskarS
Google Fonts lets you just download the font, right? So what's the problem with self-hosting them? They're not encrypted or anything. Like, I'm not sure what else you would want Google to do.
dawnerd
It’s like we’ve taken a step back and people forgot how the web used to be built. I’ve also seen someone ask how you use JavaScript if you don’t have a preprocessor like webpack.
Velocifyer
Google fonts download button gives you a TTF file and not a WOFF2 file so you have to read the CSS to get the WOFF2 file.
trnglina
What made you give up? As the article describes, self hosting fonts is as easy as making the static font files available and then adding a few lines of CSS. What solution would you want Google to offer?
cornedor
Since caches are no longer shared between pages, it actually is often better to self host your fonts than rely on public CDN’s. Makes it even weirder that Google does not offer a simple solution to self host fonts.
https://dev.to/rstacruz/public-cdns-arent-useful-anymore-2b6...
dewey
And once you use these fonts, make sure to not use blue as link color with a dark background, so that your readers can actually read your content too ;)
gethly
It's like people are rediscovering CSS from 20 years ago.
I use google-webfonts-helper (https://gwfh.mranftl.com/fonts) to get google fonts