4 ms·
> Downloading one or two font files to render text won’t have a massive impact on speed, downloading five or ten font files will! I wonder why we almost never
by KronisLV 5y ago
> Downloading one or two font files to render text won’t have a massive impact on speed, downloading five or ten font files will!
I wonder why we almost never talk about the actual filesizes of different fonts and which ones take less space, for when the total size of our webpages is important and we'd like to make our font choices with that in mind, provided that we don't want to just use the system fonts for whatever reason.
For example, i described some of the specifics of serving my own fonts on my site instead of using Google Fonts in a discussion about privacy some time back: https://news.ycombinator.com/item?id=29996364 https://news.ycombinator.com/item?id=29996364
The question that i posed in that comment still hasn't really been answered and is still relevant in my eyes:
> While we're on the topic of fonts, it's a shame that we don't think more about how heavy the fonts we choose to use are, since right now serving my own fonts eats up around half of the bandwidth on my non-image-heavy site. The single article that i've found on the topic so far as been this, "Smallest (file size) Google Web Fonts": http://www.oxfordshireweb.com/smallest-file-size-google-web-fonts/ http://www.oxfordshireweb.com/smallest-file-size-google-web-...
Why doesn't Google Fonts have a field somewhere that'd show the total size of a font in any number of supported file formats? Why do we have so much effort towards optimizing the sizes of images, and yet fonts don't get the same love?
- nicbou 5y agoFonts on my website add up to around 40kb. It barely makes a difference.
- Aeolun 5y agoHeh, if I serve custom Japanese fonts we happily go into the megabyte range.
- oefrha 5y agoThat’s why you subset it when you have to use one. I’ve used CJK font subsets measured in single to double digit KBs in my own designs over the years, they’re fine. Don’t count on using a custom font for arbitrary text though.
- Aeolun 5y agoLol, the website is in Japanese :) I can hardly have half of the characters someone types revert back to the system font (though I imagine it would look really funny).
- lelandfe 5y agoAdobe Fonts does a pretty crazy thing for East Asian fonts where they stream glyphs on demand to the page: https://helpx.adobe.com/fonts/using/dynamic-subsetting.html https://helpx.adobe.com/fonts/using/dynamic-subsetting.html I've been keeping an eye out to see if there's been an equivalent FOSS solution but nada so far.
- Aeolun 5y agoYeah, this is fantastic if you want constantly blinking text. We used adobe fonts for a while, but I really wasn’t impressed. Hundreds of dollars to buy a font it turned out we could only use through their hosted service.