Live data from Hacker News

Self-host your fonts for better performance

wicki.io

321–330 of 417 posts

Re: Self-host your fonts for better performance

#321
post #283

Earlier quoted context omitted.

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.

I think that's a feature now, at least in what's shipping in Chrome. You can click "custom" on any website and select the resources that site is allowed to load, by type.

UI screenshot: https://i.imgur.com/o0UsSdP.png

Re: Self-host your fonts for better performance

#322

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

> "Do you really want a browser to be gigabytes large? Especially on mobile it's not viable" Absolutely, i would rather give the browser 50 GB even on my phone over paying my mobile operator for downloading the same data over and over again. And it wouldn't take anywhere near that much, I am sure 80% of most used fonts are only a couple dozen, that wouldn't tale gigabytes

It also doesn't have to be a binary proposition.

For example, Google Maps by default doesn't load maps of the entire world when you install it. However, it does let you opt-in to pre-downloading specific areas that you frequently travel.

Browsers could do the same by simply adding an opt-in to download / cache common assets like fonts, jquery, etc.

Re: Self-host your fonts for better performance

#323
post #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 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 characters, to make sure everything was perfect. I know other members on my team did the same. It wasn't some sort of mandate, it was just some sort of institutional knowledge, or maybe pride, that Microsoft was paying for custom fonts for our project and we were going to make well sure and good that what we delivered to customers was perfect.

I know there is a holy-war between people who like MacOS's font rendering and people who like Microsoft's font rendering, but I hope everyone can respect the amount of pride that both companies put into their work.

Re: Self-host your fonts for better performance

#324

Earlier quoted context omitted.

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).

But this is exactly the nature of the problem: a company that has basically the power of big government dictating what people will do without their previous approval. The very existence of such a company is anti-democratic. Now we are stuck with a single company dominating a public service (internet) that affects the lives of billions of people around the world and we don't have a say on how they manage this network.

No, the nature of the problem is that Google (and big government, in its own ways) is trying to solve hard problems with no good solution. There are clear downsides (described in this thread) to all the possible options, and even the option of letting people choose between bad options doesn't actually make people's lives better at the end of the day.

Keep in mind that Chrome basically pioneered the concept of doing OS-level sandboxing between websites. We can complain all we want about how Google should give people the option to choose whether they want hard site isolation or not, but if it weren't for Google's investment in Chrome, we wouldn't even think of the option. Would it be better to live in a world where hard problems don't get possible solutions at all, where no one feels like they have choices taken away from them because the choices were never given them in the first place?

(I do firmly agree that the very existence of Google is anti-democratic, though... but I get there via an entirely different argument. I'm glad to see more people concluding this, nonetheless.)

Re: Self-host your fonts for better performance

#325
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…

There are so many solutions!

* In uBlock Origin (which is a must have on bad internet): Settings > Block remote fonts

* In browser, Firefox about:config, gfx.downloadable_fonts.enabled, Chrome run with --disable-remote-fonts

* Download fonts when on good connection

> You can download all Google Fonts in a simple ZIP snapshot (over 300MB)

> https://github.com/google/fonts

installation depends on OS, on Arch Linux it would be

    $ yay -S ttf-google-fonts-git
basically it puts font file under /usr/share/fonts/

Google recommends

> using a fonts manager (such as SkyFonts) that automatically syncs the latest versions of fonts from the Google Fonts API to your computer.

https://developers.google.com/fonts/faq

------

I browse with JS disabled by default in uMatrix, turn it off on problematic websites (maybe ten times a day). It would revert back to disabled on next browser reload. And I have maybe 20 hosts enabled by default which I use often enough.

Re: Self-host your fonts for better performance

#326

Earlier quoted context omitted.

To a first order approximation, nobody actually changes any of these advanced settings. The default is what most people use, and most settings might as well never exist.

Sure, but the people that do change get these settings are people too, and they’re often the type of people that will be vocal about your product and recommend it to people.

Then why haven't any of those vocal people managed to get Firefox, KDE, or Devuan to nontrivial market share?

Re: Self-host your fonts for better performance

#327
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…

> and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?)

More readable, and also helps one focus on the content. A lot of web publications with literary pretensions (New Yorker, Quillette, LRB …) use pretty classic-looking externally loaded serif fonts for their articles, which not only slows down reading but can also (IMO) make one less critical of the content than one otherwise would be.

If I were the editors of these magazines I would be seriously tempted to force the use of Comic Sans for all article content. May not be good from advertising point of view but it signals a kind of intellectual honesty that I suspect is valued higher by their readership than a "classic look"

Re: Self-host your fonts for better performance

#328

Earlier quoted context omitted.

> Any correctly-coded website will try a local source first, which should help a lot for poor connections. Then Google Fonts is not correctly coded, as it'll use remote font only. And myriads of websites reusing Google Fonts snippets. To try local source first, you have to explicitly ask for it in @font-face/src which Google Fonts does not do. So installing font into your OS won't help you with any website using Goog…

From the google fonts FAQ it says they will use the locally installed font if possible https://developers.google.com/fonts/faq#can_i_download_the_f... > Note that when browsers render websites that use the Google Fonts API, they will check if a font is installed locally on your computer, and prefer to use the local version over web fonts.

Here's snippet from CSS served to my browser:

https://fonts.googleapis.com/css2?family=Inconsolata&display...

    @font-face {
      font-family: 'Inconsolata';
      ...
      src: url(https://fonts.gstatic.com/s/inconsolata/....woff2) format('woff2');
  unicode-range: U+0000-00FF, ...;

Re: Self-host your fonts for better performance

#329
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…

> having custom fonts disabled (that is, fonts I don't have locally)

Safari prevents website from using local fonts. Only web fonts.

The thought is that a site could check which fonts work for you based on local fonts and use that towards your marketing thumbprint.

Re: Self-host your fonts for better performance

#330
Every once in awhile I load up the Dillo web browser[1], an extremely basic browser with minimal CSS support and no javascript support. I am always floored by how fast some websites are, and saddened as the list of websites I can realistically visit shrinks each time I try it. (Hacker news works great). It is so fast compared to modern browsers that it almost feels like a page is loaded and rendered before I even finish clicking the mouse button.

[1]: https://www.dillo.org/

Post reply on HN