Earlier quoted context omitted.
Font designers publish poor quality fonts to promote their products? That isn't supposed to work.
You’re underestimating how much work and skill it takes to make a good font, even for a great designer, so type foundries like to lock good fonts up behind rent-seeking license agreements.
Self-host your fonts for better performance
151–160 of 417 posts
Re: Self-host your fonts for better performance
#152Re: Self-host your fonts for better performance
#153What if you had a declaration like @font-face { font-signature: somehash } And the browser just checks to see if it already has the font. If you release a webfont you can share it with signatures or just generate signatures if the author hasn't done it for you. This way if you're self-hosting Lato and the user already has Lato, they don't need to download it again.
That kind of content addressable naming based on hashes would be awesome for the web in general. Think of all the big JS frameworks. If they were all referenced by hash, their size would become pretty much irrelevant, as they would be amortised across potentially thousands of requests. But the web chose to go with unified resource LOCATORS for everything, and I don't think it'll be easy to change that mindset. It's t…
It would take a while for the cache to warm up, but with typical usage that would not take very long. Your performance becomes a bit of a lottery for a few users, but on the whole you should see gains.
Re: Self-host your fonts for better performance
#154Maybe 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…
Re: Self-host your fonts for better performance
#155Earlier quoted context omitted.
Yeah. That's the first thing I noticed. I was curious whether the OP either returned back to Google Fonts since posting this or never did it in the first place!?
Do you mean they’re hosted by google or self-hosted?
Re: Self-host your fonts for better performance
#156Earlier quoted context omitted.
I'm not an expert but: - 1. Copyright (though many fonts are free, true) - 2. Everyone uses a different font (just like everyone uses a slightly different version jquery) so cache hit would be pretty small IMO. Do you really want a browser to be gigabytes large? Especially on mobile it's not viable Maybe if browsers standardized on shipping, say, 20 carefully chosen fonts (not necessarily the most popular ones, just…
I mean I’ve said it before but shipping like 20 (montserrat, raleway, open sans, etc) would cover most websites who use Google Fonts.
Web standards and browser features are generally built for the long term and backward compatibility. I mean, it's not impossible to find a solution, but it's definitely not "let's download some fonts and bundle with the browser, done" kind of problem.
Re: Self-host your fonts for better performance
#157Earlier quoted context omitted.
Something like this is really popular, covers most cases and older systems/browsers and even emojis: `ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji` For brand-specific fonts though, I highly recommend cleaning the font files from any characters/features you don't need, and then just s…
Once you’ve cut it down to just the characters you need (say it’s the letters in your logo and slogan) could you inline that within the page itself (and how?) to make it not need an extra request.
In this article: https://www.zachleat.com/web/web-font-data-uris/ mr. Leatherman advises against (because of the bulkiness of web fonts blocking rendering for too long) but he has not taken into account rolling your own custom mini-font with just the glyphs you need.
So I think your idle musing may indeed have merit!
Perhaps those more knowledgeable and preferably with benchmarked evidence could care to comment?
Re: Self-host your fonts for better performance
#158I'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 did an experiment a few months ago where I just switched of font overrides and set my default font to Comic Sans, at a pretty large default size (and I tend to zoom in a lot, too). It actually was quite pleasant and readable, despite the particular font choice.
Re: Self-host your fonts for better performance
#159By the way, does anyone know if browsers are at least merging/deduplicating cached resources locally again (e.g. by storing cached objects by content hash)?
The same could theoretically apply to computationally intensive tasks like WASM pre-compilation (although care should be taken to record the compilation time and delay loading appropriately for cached loads from different domains, or that would be the next cache leak).
Re: Self-host your fonts for better performance
#160I'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…