Live data from Hacker News

Self-host your fonts for better performance

wicki.io

401–410 of 417 posts

Re: Self-host your fonts for better performance

#401

Earlier quoted context omitted.

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, ...;

Thank you, I gave advice and missed this change.

I've created issue "Local font name makes web accessible", and I hope it would be fixed.

https://github.com/google/fonts/issues/2855

Re: Self-host your fonts for better performance

#402

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 would be interesting to gather a list. uBlock Origin can disable Web Fonts

https://github.com/gorhill/uBlock/wiki/Per-site-switches#no-...

so it should be possible to log. And given a list it is not hard to download.

Re: Self-host your fonts for better performance

#404
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 tend to disable page fonts and use my own selection instead because I prefer to have anti-aliasing off. Fonts that were designed before cleartype look great with AA off but cleartype fonts usually look awful with AA off because of the lack of hinting.

Re: Self-host your fonts for better performance

#405
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 tend to disable page fonts and use my own selection instead because I prefer to have anti-aliasing off. Fonts that were designed before cleartype look great with AA off but cleartype fonts usually look awful with AA off because of the lack of hinting.

why do you prefer to have anti-aliasing off? what sort of monitor do you use?

Re: Self-host your fonts for better performance

#406

Earlier quoted context omitted.

I tend to disable page fonts and use my own selection instead because I prefer to have anti-aliasing off. Fonts that were designed before cleartype look great with AA off but cleartype fonts usually look awful with AA off because of the lack of hinting.

why do you prefer to have anti-aliasing off? what sort of monitor do you use?

I have a regular 16:9 monitor, 2048x1152, in which I have Windows font scaling set at 150%.

The reason I prefer AA off (with fonts that were designed for it like Verdana or Bitstream Vera Sans Mono) is because I find it less tiring on the eyes. With AA off, the edges are all sharp and crisp, there's no blurriness. It looks closer to print. When AA is on, they look smeared and don't have clearly defined edges.

What is also a puzzler, as displays become increasingly higher resolution, now 4K and heading toward 8K, the need for AA is supposed to disappear. You don't need to fake smoothness at high pixel resolutions, yet many OSes are actually now making it harder to turn AA off.

It gets dumber.. OSes that used RGB subpixel AA (cleartype) because they're now on tablets and other devices that rotate, they can't count on the RGB stripe, so they stopped using RGB subpixel AA and went back to greyscale AA.

Re: Self-host your fonts for better performance

#407
post #322

Earlier quoted context omitted.

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

From a privacy point of view,

Not embedding all of them would allow tracking. Caching all web fonts would allow tracking.

The solution is embedding all the popular ones so everyone has them and it can't be used as a signal.

Re: Self-host your fonts for better performance

#408
post #358

Earlier quoted context omitted.

It's rent-seeking if, instead of selling you the font once under a mutually agreeable license, they charge you an ongoing fee to "use" the font under conditions that the foundry controls and can change without re-negotiating the contract. This is especially true if the condition are "you can use for purposes x, y, and z, but if you want to use it for a, b, or c you have to pay a higher rate".

How can they charge you if you don’t agree to the contract?

What do you mean? If you agree to the contract when you rented access to the font, you're subject to all its conditions. If you don't want to pay the additional rent, your choice is to break the contract and lose access to the font, or pay up.

Re: Self-host your fonts for better performance

#409
post #308

Earlier quoted context omitted.

Good idea, except that the purpose of Google fonts (from Google's perspective) is to provide another means of tracking what sites people are visiting. Maybe a browser extension can do this though.

If they provide it in Chrome, there’s no reason they couldn’t track that stuff even without Google Fonts being bundled. The browser already knows every site you visit. Knowing you visited example.com that used “Example Sans” doesn’t give anything more than just knowing you visited example.com. Bundling with browsers outside of Chrome would be a different story, but Google has no say over that anyways.

Not everyone uses Chrome. And Chrome's high market share is not a given going forward (especially with regulators eyeing it)

Re: Self-host your fonts for better performance

#410
post #357
post #308

Earlier quoted context omitted.

Good idea, except that the purpose of Google fonts (from Google's perspective) is to provide another means of tracking what sites people are visiting. Maybe a browser extension can do this though.

That's a bold assertion, care to back that up?

Google claims to not associate the data with particular users (it's anonymized), but there's nothing to stop it from using the data to know how popular certain sites or pages are, what region(s) visitors are coming from, and what user agents (browsers) are being used. And so on.

Let me ask you a similar question. Is there any evidence whatsoever that Google built this service out of the goodness of their hearts, and have no intent of using it to gain any sort of competitive advantage?

And if you do believe that, is there any evidence that Google will continue to spend millions of dollars supporting a service that gives them zero benefit? What does their track record say about that?

For the record, I'm not anti-Google, nor ultra privacy focused. I just think it's common sense that Google expects some sort of ROI here. To many, using Google fonts is considered a fair exchange (especially given that their data is anonymized) and I think that's a perfectly reasonable position. But make no mistake, there is a clear benefit to Google here.

Post reply on HN