Live data from Hacker News

Self-host your fonts for better performance

wicki.io

281–290 of 417 posts

Re: Self-host your fonts for better performance

#281
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,…

In addition, not all users are going to want to use whatever font you (the web designer) decided on. I have my preferred fonts on my system, and I expect my browser to use them. How arrogant of the web developer to override the user's preference!

I remember when the browsers even allowed the user to configure a background image for content. You could have all your web sites render over a tiled picture of a brick wall if you wanted. Year after year, we give up end-user configurability and simply hand it over to nameless web designers who decide what is good for us.

Re: Self-host your fonts for better performance

#282
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'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'?).

That might be due to font hinting. The default fonts (on Windows) were beautifully manually hinted to give a really crisp results without font smoothing. But manual font hinting is super expensive, so web fonts don't do it. If you disable them, I'm sure the system has to fall back to the (higher quality) defaults.

Most web fonts are automatically hinted, so they only look acceptable with font smoothing on (at normal font sizes with normal DPIs). If you turn smoothing off, the fonts look super ugly with all kinds of artifacts like weird double-thick lines.

I've tried to disable web fonts because I hate font smoothing (to me it's just blurry, not smooth), but the issue I've run into is the fad of using a custom font for icons, so I end up getting lots of unicode tofu for graphics (e.g. https://twitter.com/FakeUnicode/status/1194628430559469568).

Re: Self-host your fonts for better performance

#283

Earlier quoted context omitted.

Is there a reason to not use uBlock Origin? I’ll admit, I never used uMatrix, so I don’t know what it does; only adblockers.

uMatrix is uBlock Origin (uBO) with 2 differences: 1) No cosmetic filtering. 2) A more powerful interface, as _underfl0w_ describes at https://news.ycombinator.com/item?id=25302405 The key thing which that comment does not mention is that the interface enables a whitelist approach — block everything (read: as much as you want) by default and selectively allow certain types of content from certain sites. This is impor…

Actually, you _can_ configure uBO to block third-party content by default (by turning on advanced user mode); however, it's not as good as uMatrix as there is no split of request type (script versus image, etc.) as well as no UI to manage subdomains. You'll have to do that last part by editing the text configuration manually.

Re: Self-host your fonts for better performance

#284

Earlier quoted context omitted.

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.

From TFA: > Since Chrome v86, released October 2020, cross-site resources like fonts can’t be shared on the same CDN anymore. This is due to the partitioned browser cache

Google could at least globally cache all the fonts when Chrome is installed; a one time download which is then available for use on all sites. If they licensed other browsers to do the same, the number of fonts available to designers would be large without the performance hit.

Re: Self-host your fonts for better performance

#289

Earlier quoted context omitted.

Yeah, however, they could make these things configuration rather than imposing a policy on every user: in different contexts different privacy/performance tradeoffs are acceptable

And then the criticism would be “Google enables violating the privacy of rural and poor customers with less access to high speed Internet”. I’m not saying any one of these criticisms is wrong. Just that they’re predictable and there’s basically no move Google could make besides shutting down that would satisfy the complaints (and even then it would be the ultimate “Google kills products” meme).

So? You are just describing how discourse works.

Entity A does thing that impacts entity B. Entity B makes those effects known to a broader group than entity B. Maybe entity A does thing about it, maybe not.

Re: Self-host your fonts for better performance

#290

Earlier quoted context omitted.

I've sped up sites before by using inline svg rather than icon fonts - downloading an entire icon font for a few icons is inefficient when the actual SVG needed for those icons is < 1Kb and is waaay faster as inline SVG.

It's only faster on the first load. On all subsequent loads its slower and consumes more bandwidth. I find this irresponsible.

That surely depends on context; for a lot of pages I'll never make a second load at all.
Post reply on HN