Live data from Hacker News

Self-host your fonts for better performance

wicki.io

191–200 of 417 posts

Re: Self-host your fonts for better performance

#192
post #77

This article isn't advocating saying goodbye to Google Fonts. It advocates not delivering them via CDN, but self-hosting them.

Yes it is...? Google Fonts is the service, not the fonts themselves. Check the "About" and "License" tab of any font on Google Fonts, they're not created by Google.

From the article: "then you’re best off downloading your used Google Fonts and self-host them"

I read that as "use Google Fonts"?

Re: Self-host your fonts for better performance

#193
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

If you want a really fast web experience, try disabling images and javascript too! (on rereading this I sounded sarcastic, but I really wasn’t trying to be)

That’s the feature I really like in Brave, which stores that setting persistently per site in a convenient side panel. For things like unoptimized news sites it’s the difference between 10-30 and <0.5 second load times on the subway.

Re: Self-host your fonts for better performance

#194
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

I HATED sites that used custom fonts when I lived in the country.

There are only two ways loading such a site goes:

a) you get to stare at a blank page for a couple minutes while the font downloads, if it downloads at all. (this seemed to be google's favorite way to screw over people with bad connections; acknowledgment that it's going to suck and doing it anyway)

b) you get two minutes into reading the page only for everything to suddenly jump somewhere else when it switches to the font. (this seems more like the result of ignorant web designers)

JS sucks but webfonts consistently make the web an awful place.

Re: Self-host your fonts for better performance

#196
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

The "cleaner" feel may well be to do with better font rendering for desktop fonts, because you'll be using something like TTF rather than WOFF. Web font files have to trade off file size for quality, which desktop fonts don't have to do.

Don't tell people this, they'll start making larger fonts.

Re: Self-host your fonts for better performance

#197
post #169

Earlier quoted context omitted.

uMatrix hasn't been updated in a year and the repo has been archived: https://news.ycombinator.com/item?id=24532973 You'll probably have to let it go someday :(

I'm well aware. But that day will be when it stops working, and right now it still works fine. (Actually, it will be some time after that, since the day it stops working I will spend some time investigating how much work it would be to un-break it myself. The web can pry uMatrix from my cold, dead fingers. And I suspect I am not alone in feeling that way.)

You're not. uMatrix makes the web sane and I'm never lettign it go. What I did (on Firefox) is disable uMatrix in Private windows and I just go there for payment sites. All the rest of the wading through internet-crap is done from within the safe cocoon of uMatrix.

Re: Self-host your fonts for better performance

#198
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

Web fonts are a big one in terms of making various websites feel fast because, when implemented incorrectly, they massively slow down initial text paint. With that said, they're a fantastic feature but are also way overused. You don't need web fonts unless your website is either heavily type-centric, or has font-related dependencies (such as embedded content of some kind). Icon fonts are also a neat use of web fonts,…

Unless your font shares (exactly) metrics with the ones the user has installed there's no way to implement this correctly. This is something you can't know so there's no way to implement this correctly.

Re: Self-host your fonts for better performance

#199
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

I live in a rural area with bad internet, and the trend to load all of these external fonts, images and javascript externally over https basically makes the web unusable for us. The overhead of the handshakes required by the https connection greatly increased the page load time, and there is about a 1-in-4 chance of one of them timing out and not loading, so as a result the page doesn't load properly or pauses and st…

Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place? A CDN basically. I know jQuery and Bootstrap recommend using their CDNs so browsers have the copy in their cache.

Of course, there’s always the tracking ability, but that’s inherent to every CDN.

Re: Self-host your fonts for better performance

#200

Maybe I'm being naïve, but why don't browsers ship with more popular fonts bundled to avoid problems like these? I have no issue with any of my browsers taking up fractionally more space for an extensive cache of the most popular web fonts when the payoff is better performance on so many sites. Of course, servers should still be capable of serving the fonts that the client requires to render the content correctly, bu…

Copyright and size: fonts are larger than you might think because they need full Unicode support and good fonts have tuned variants for different weights, styles, and sizes, along with alternate symbols and ligatures, etc. which all add up.

Self-hosting is the way to go since it gives you full artistic control and you can use things like the Unicode-range CSS property to tell clients how to combine smaller fonts so you can support many languages without forcing a French browser to download a ton of Chinese glyphs which aren’t used on the page.

Another nice option we have now is using font-display to allow using a similar system font until downloads are completed, which can work really well for slow connections:

https://calendar.perfplanet.com/2020/a-font-display-setting-...

Post reply on HN