Live data from Hacker News

Self-host your fonts for better performance

wicki.io

341–350 of 417 posts

Re: Self-host your fonts for better performance

#341

Earlier quoted context omitted.

As a guy who does this blocking pretty ruthlessly (edit: inc. cookies), I'd like to understand why - I don't take offence at 'sneer', ISWYM but I'd like to understand the other side of the fence. TIA

sorry, 'sneer' is probably a bit strong - it's really just a lack of understanding on my part (of your side of the fence). I personally find browsing the internet without javascript or cookies enabled by default to be incredibly frustrating/inconvenient, but I'm sure it's all very subjective, down to your own personal browsing habits.

I found it frustrating and inconvenient at first. Now when I try to use a browser w/ default Javascript settings I find that I'm even more frustrated than when I started using NoScript. Websites left to their own devices to run arbitrary code on my machine are almost universally terrible to use. Local news sites are, by far, the worst. Lots of sites are terrible though.

Re: Self-host your fonts for better performance

#342

Earlier quoted context omitted.

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…

Use Stylus, for example I do not like StackOverflow left menu and sticky menu:

    .left-sidebar { display: none }
    #content { width: 100% /* calc(100% - 164px) */ }
 
    .top-bar { display: none }
    body { padding-top: inherit /* 50px */ }
its no script experience cluttered by warning and GDPR consent:

    #noscript-warning { display: none }
    body { margin-top: inherit /* 1.9em */ }

    #js-gdpr-consent-banner { display: none }
Users can extend, overwrite and even discard authors styles, but they have to either understand web layout or use userstyles.org.

Re: Self-host your fonts for better performance

#343

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

Seems like then Google should include most of those fonts as part of the browser updates. Or even the top 90% seen.

Re: Self-host your fonts for better performance

#344
post #59
post #11

Earlier quoted context omitted.

Have you tried something like uMatrix? If you use it in the denylisting mode, it doesn't seem to impact much on my web browsing experience. By default it is in allowlist mode, which means it's speedy to open pages, but you run into trouble quite quickly. I really can't stand browsing the web without it.

What is the maintenance status of uMatrix? I haven't checked recently, my most up to date info is that Gorhill left it due to too many bogus issues filed on Github.

It works, I assume there would be forks if needed.

Re: Self-host your fonts for better performance

#345
post #318

Earlier quoted context omitted.

The same argument applies to developers not using the state of the art computers packed with RAM. These problems can't be found in QA: if they even show up at all it's too late. Sure, their code will compile faster but they won't get a feel for how it behaves in the real world. Probably the best is to have fast build servers on the LAN while typing at pedestrian machines.

Whatever excuses we want to make for forcing web devs to use old netbooks from 2004, I'm down with it (everyone knows they think they're cooler than us, we need to knock them down a notch). Usability? Cool yes that sounds very important or whatever.

I am a software developer; why would I want to "take myself down a peg"?

Also I doubt there are many people reading the web on 2004 netbooks. You know what I am talking about.

Re: Self-host your fonts for better performance

#346
post #282

Earlier quoted context omitted.

> 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 do…

> 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. I used to work at MS, and a lot of people don't realize exactly how much time, money, and love is put into fonts there. When my team ordered custom fonts, I personally spent a lot of time going over each character pixel by pixel, in combination with many other cha…

Just want to say that I really appreciate you and people like you. I can spend hours looking over and comparing fonts I use because small problems can really bug me, no pun intended.

Re: Self-host your fonts for better performance

#347
post #345

Earlier quoted context omitted.

Whatever excuses we want to make for forcing web devs to use old netbooks from 2004, I'm down with it (everyone knows they think they're cooler than us, we need to knock them down a notch). Usability? Cool yes that sounds very important or whatever.

I am a software developer; why would I want to "take myself down a peg"? Also I doubt there are many people reading the web on 2004 netbooks. You know what I am talking about.

1. I believe the parent post was referring to non-web-developers taking web-developers down a peg, not anyone taking themselves down a peg.

2. I used a small 2007 laptop well in to 2018, and I believe that the software I wrote was better for it.

Re: Self-host your fonts for better performance

#349
post #282

Earlier quoted context omitted.

> 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 do…

I wonder how hard it'd be to create an extension that renders all alphanumeric chars in a font of your choosing, and all other characters in the font the webpage wants. It'd be more overhead of course, and basically the opposite of what this thread is about, but it's something I'd be interested in. I'd love to be able to choose a font without things getting mangled.

> I wonder how hard it'd be to create an extension that renders all alphanumeric chars in a font of your choosing, and all other characters in the font the webpage wants.

I'm not too familiar with the details of the icon fonts, but my bet is that most of those characters are in the private use area.

I guess it boils down to if an extension can hook into the font-resolution process, to have different resolution policies for different character ranges. I know there are extensions that can block web fonts, but maybe they just prevent the resource from loading at all.

Re: Self-host your fonts for better performance

#350

Title is very misleading and sensationalistic. It's about keeping Google Fonts ( not saying goodbye!) but simply self-hosting them instead of using Google's CDN for better performance. Seems like the author's trying to bait us by making us first assume Google's canceling the product, or that Google's done something scandalous so we should avoid it. :(

Yep, I assumed this was about another Google cancellation. Mods, would it be possible to change the post title to something mentioning font-loading or performance or self hosting? I can't really think of a title myself at the moment.

"self-hosting google fonts for performance, privacy"
Post reply on HN