Live data from Hacker News

The Fastest Google Fonts

csswizardry.com

41–50 of 152 posts

Re: The Fastest Google Fonts

#41
post #3

Just use the built-in fonts. Use a good fallback list so each platform gets a good option. Specifying custom fonts is largely a waste of bandwidth for a very marginal improvement in aesthetic. The people who care most are the ones making the decision to use that font. The solution, tritely, is they should stop caring about the little details that much. The bigger details are usually what move the needle. Don't get st…

There seems to be a reply like this at the top of every font-related thread on HN. I often wonder whether it's coming from designer/developers or from end users. Web fonts aren't popular just because they're pretty. They continue to be used everywhere because they offer a consistency that's impossible to get otherwise. With a plethora of mobile devices and desktop environments, you can't get a consistent look-and-fee…

I'm a designer and I'm very pro system fonts. Then again I don't work for a company with a typography-related identity like NYT or WSJ. For them it's a lot more important, at least in theory.

But if you make like, a productivity tool or some sort of SAAS? just use system fonts.

Edit: then again, I say this as a designer who has worked a lot in companies with heavy emphasis on accessibility and performance, so that may be a bit of my own bias...

Re: The Fastest Google Fonts

#42

> It’s widely accepted that self-hosted fonts are the fastest option: same origin means reduced network negotiation, predictable URLs mean we can preload, self-hosted means we can set our own cache-control directives, and full ownership mitigates the risks that come with leaving static assets on third-party origins. This is my general approach now. Feels like a lot of work to keep up with what the ideal remote loadin…

Another plus is you are not potentially leaking information about your users to a third party.

Re: The Fastest Google Fonts

#43
post #32

Earlier quoted context omitted.

There seems to be a reply like this at the top of every font-related thread on HN. I often wonder whether it's coming from designer/developers or from end users. Web fonts aren't popular just because they're pretty. They continue to be used everywhere because they offer a consistency that's impossible to get otherwise. With a plethora of mobile devices and desktop environments, you can't get a consistent look-and-fee…

You said it yourself: Users are viewing your site on devices with totally different screen sizes, different resolutions, on different platforms, with displays of varying brightnesses, glare, viewing angles, color spaces, and in environments of varying levels of lighting. Given these constraints, it's not possible to get a consistent look-and-feel. So don't waste resources trying. You'll create more problems than you'…

> So don't waste resources trying. You'll create more problems than you'll solve.

This doesn't follow. It's an argument for "put black text on a white background and call it a day because this is too hard". People don't pay money for that.

Web fonts solve an entire class of problems unrelated to whether the user is standing in the sunshine or not.

> Nobody tests their web fonts as thoroughly as the default fonts have been tested on their respective platforms and devices.

This is wrong in fact, given that the most popular fonts are coming from big design houses that probably know more about the details of font rendering than I'll ever know about any subject [1]. It's also wrong in principle because exactly zero people get paid to test platform-default fonts for my application or website. That leaves it up to the developer to test the site on every platform under the sun and moon and, even when they do that, they still have users with goofy font installations that make it look bad or unusable.

> Using the default fonts guarantees you'll never have to worry about such bugs.

Again: it doesn't, because when you do this, you're using whatever fonts are installed on the user's system, and there are a lot of people running around with crappy knock-off fonts installed. Using the default fonts guarantees that this is an issue.

And where are these people coming from that care about inconsistent subpixel rendering in web fonts but don't care about inconsistent layouts from using whatever bag of fonts they happen to have on their system at the time?

> The system's installed fonts are guaranteed to work.

Allow me to repeat myself: a "Consolas" font on one system is not the same as a "Consolas" font on another system. There are no guarantees when relying on a system's default fonts, and that's why web fonts are popular.

> ...Wordpress, and many others use the system fonts.

It's a shame you included this example, because it opens a big door for me.

Let's look at the style.css file for Wordpress's default "twentytwenty" theme [2]. It includes a gnarly font hack near the top along with the following comment:

> Chrome renders extra-wide   characters for the Hoefler Text font. This results in a jumping cursor when typing in both the classic editor and block editor. The following font-face override fixes the issue by manually inserting a custom font that includes just a Hoefler Text space replacement

...and right below that it includes two web fonts.

Their twentynineteen theme includes the same hack but no other web fonts.

How about the most popular third party theme? Web fonts: https://themes.svn.wordpress.org/astra/2.4.4/assets/fonts/

15 out of the 20 most popular Wordpress themes include web fonts (not counting FontAwesome or other symbols-and-icons fonts). I checked.

Facebook, Github, and Twitter operate at scales that are not relevant to most of the engineers on HN. They are motivated to spend engineering budgets on performance and they're willing to forsake things like typographic consistency if it saves them having to pay for another data center.

The first not-Facebook-scale example you cited is full of web fonts.

[1]: https://fonts.google.com/?sort=popularity

[2]: https://themes.svn.wordpress.org/twentytwenty/1.3/style.css (warning: content-disposition: download)

Re: The Fastest Google Fonts

#44
post #32

Earlier quoted context omitted.

There seems to be a reply like this at the top of every font-related thread on HN. I often wonder whether it's coming from designer/developers or from end users. Web fonts aren't popular just because they're pretty. They continue to be used everywhere because they offer a consistency that's impossible to get otherwise. With a plethora of mobile devices and desktop environments, you can't get a consistent look-and-fee…

You said it yourself: Users are viewing your site on devices with totally different screen sizes, different resolutions, on different platforms, with displays of varying brightnesses, glare, viewing angles, color spaces, and in environments of varying levels of lighting. Given these constraints, it's not possible to get a consistent look-and-feel. So don't waste resources trying. You'll create more problems than you'…

But it is possible to get a consistent look and feel for fonts, by using web fonts.

Re: The Fastest Google Fonts

#45
post #24

Earlier quoted context omitted.

> Use a good fallback list so each platform gets a good option. Specifying custom fonts is largely a waste of bandwidth for a very marginal improvement in aesthetic. If you're content with mediocrity, sure. But if you value your brand you will want the fonts to send the message that you want to be associated with your brand. Also, you'll probably want them to be in line with the rest of the design.

Web fonts are my litmus test for whether I can trust a designer's judgment. Users don't want to see a site's brand in every letter on the page. They want legible text that loads quickly. The default fonts on Windows, Mac, iOS, and Android are the result of millions of dollars of R&D. Custom fonts are far more likely to have issues with kerning, hinting, or subpixel rendering. They also degrade load times and cause a…

You snuck in a hidden implication, which is that web fonts are less legible than system fonts. That's absolutely not the case across the board.

Re: The Fastest Google Fonts

#46
I do like that now Google lets you downloads the fonts, so you can serve from your own CDN without having to hunt them down or download them manually from their CDN endpoint. One thing I'd like to see Google do is add icon font sets to their repo.

Re: The Fastest Google Fonts

#47
post #21
post #13

Earlier quoted context omitted.

I wonder if Mozilla or DDG or some other privacy centric org might consider mirroring Google's fonts.

Cloudflare should do this. They already have the infrastructure and they have a pretty good privacy reputation.

Mozilla (and Chromium) could mirror Top X Google Fonts directly into the user's font system and entirely eliminate remote calls for a small size increase in the browser installation.

(Or Microsoft and Apple could do it in OS images.)

You can do it yourself, even, but unfortunately font loading timings are a deanonymization vector with its own privacy implications and it would take a concerted group effort to install similar font sets locally to avoid those privacy issues.

Re: The Fastest Google Fonts

#48
post #21

Earlier quoted context omitted.

Cloudflare should do this. They already have the infrastructure and they have a pretty good privacy reputation.

Mozilla (and Chromium) could mirror Top X Google Fonts directly into the user's font system and entirely eliminate remote calls for a small size increase in the browser installation. (Or Microsoft and Apple could do it in OS images.) You can do it yourself, even, but unfortunately font loading timings are a deanonymization vector with its own privacy implications and it would take a concerted group effort to install…

That would be an interesting concept. I like the idea of including them in Windows and macOS.

Re: The Fastest Google Fonts

#49

I do like that now Google lets you downloads the fonts, so you can serve from your own CDN without having to hunt them down or download them manually from their CDN endpoint. One thing I'd like to see Google do is add icon font sets to their repo.

They've always all been open, and you've always been able to get them. https://github.com/google/fonts

Re: The Fastest Google Fonts

#50
Would it bloat Chrome significantly if Google included their web fonts in the browser? And, you know... the other browsers can actually download them? I know it doesn't seem like fair play, but... I'm surprised they haven't done it yet.
Post reply on HN