Live data from Hacker News

Self-host your fonts for better performance

wicki.io

291–300 of 417 posts

Re: Self-host your fonts for better performance

#291
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 have most blocked as well through my ad blockers. The biggest annoyance is when they use fonts for icons instead of images. I’m not sure where that trend comes from, but it’s obnoxious.

> I’m not sure where that trend comes from, but it’s obnoxious.

(1) The options for controlling the style of SVG elements (e.g. on hover) are not great.[0] In contrast, font icons can be styled as easily as any other text.

(2) Font files are usually smaller than their SVG counterparts.

(3) Font rendering is faster than SVG rendering.

(4) IE did not support SVG until version 9, but supported custom fonts since version 5.

(5) Old browsers that did support SVG had serious issues with SVG sprite maps, ranging from creating duplicate rasterisations of the entire SVG file in memory for every use of the same file in a document, to not caching the rasters at all and regenerating them every time they needed to be repainted (e.g. during scrolling). These are fixed now, but inertia is what it is.

[0] https://css-tricks.com/change-color-of-svg-on-hover/

Re: Self-host your fonts for better performance

#292
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

How do you do this exactly?

Re: Self-host your fonts for better performance

#293

Earlier quoted context omitted.

“Enslave users”, really?

Yes enslave. It might come sooner as you think with developers so busy to take their trivial apps and dev workflows into "the cloud", where they soon find they're being monitored and otherwise taken advantage off by the likes of Atlassian and github, to at best result in their replacement by a much cheaper workforce or robots. As compared to traditional F/OSS or commercial software seeking to empower users, use workf…

How is this going to work, exactly? I take my app to the cloud, Github monitors me, and then ... forces my employer to outsource me to a robot somehow?

Re: Self-host your fonts for better performance

#294
post #260

Earlier quoted context omitted.

Both sides, amirite?

I guess this is political-ish now, but yes. I'm a Canuck, and frankly most differences between US political parties is barely tangible. For many parts of the world, with real political differences, the US left and right appear completely identical. Yet sadly, each side seems to see only the differences.

As a fellow Canadian, I think that was more true during the Bush/Gore debates than it has been any time since; becoming less true with time.

While the Democrats are somewhere right of our Liberals, and hover somewhere near our Tories, the Republicans are ... Something else entirely.

We don't have any party nearly as powerful and obstructive. Try to imagine if the Bloc held control of the Senate, and you may come to understand what it's like for the Democrats when having to deal with the Republicans. The legislation they create and pass just piles up at the senate door, while the obstructionists use ever trick they can muster to undermine their opponents.

Re: Self-host your fonts for better performance

#295
post #138

Earlier quoted context omitted.

Have you got a screenshot? I'm curious as I regularly switch between Windows and MacOS and I'm happy enough with font rendering on both. In my recollection (and it's been a few years since I used a Linux GUI) Linux was the one with dodgy font rendering.

We probably get used to whatever font rendering the systems we use the most have. To me, fonts indeed look blurry on macOS and weird on Windows. Screenshots from Windows with colored pixels particularly don't look good to me. Though after having seen screens of people using Windows 10, it seems they changed whatever I really didn't like about font rendering on Windows. I still like font rendering on GNU/Linux (and An…

Perhaps the screenshots you're seeing have ClearType (i.e. sub-pixel anti-aliasing) turned on, and when it got to you (as a picture) the subpixels no longer match on your screen? For example, if one of the screens involved was vertically oriented…

Re: Self-host your fonts for better performance

#296

Earlier quoted context omitted.

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.

Afaik the license terms may already allow this for most or all of the fonts.

Re: Self-host your fonts for better performance

#297

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

I’ll add this isn’t just Chrome.

Re: Self-host your fonts for better performance

#298
post #295
post #138

Earlier quoted context omitted.

We probably get used to whatever font rendering the systems we use the most have. To me, fonts indeed look blurry on macOS and weird on Windows. Screenshots from Windows with colored pixels particularly don't look good to me. Though after having seen screens of people using Windows 10, it seems they changed whatever I really didn't like about font rendering on Windows. I still like font rendering on GNU/Linux (and An…

Perhaps the screenshots you're seeing have ClearType (i.e. sub-pixel anti-aliasing) turned on, and when it got to you (as a picture) the subpixels no longer match on your screen? For example, if one of the screens involved was vertically oriented…

This is it. This was more of an aside, it's indeed not supposed to look this way when it's directly rendered on the screen.

Re: Self-host your fonts for better performance

#299

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…

> How arrogant of the web developer to override the user's preference!

I imagine this is partly tongue-in-cheek, but I think the real difficulty here is that CSS doesn't differentiate between "user-configured sans-serif font" and "the system fallback sans-serif font". As a result, you can't allow users to override your font choices without disregarding custom fonts entirely.

Re: Self-host your fonts for better performance

#300

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. :(

Although they provide many excellent font files, after all google fonts is only a third-party host for custom font files.
Post reply on HN