Live data from Hacker News

The Fastest Google Fonts

csswizardry.com

91–100 of 152 posts

Re: The Fastest Google Fonts

#91

Off topic, but does anyone have a thought on what is the best unicode font? That is, a font that includes all the characters for the 30+ most use languages (including all the double byte languages)? I know every system had a default unicode font that any character can fall back to (I was surprised when I was working with Turkish and the font didn't 3 of the Turkish characters so it fell back to the system font for th…

Noto (https://www.google.com/get/noto/) is a popular font that contains glyphs for all languages. It's a gigantic 1.1 GB file.

I'm involved in fonts for my native language (Sinhalese), and let me tell you: dealing with fonts for multiple languages are is not easy! Some of the Asian languages including Sinhalese are pretty difficult to get right, and glyphs are quite difficult to give a character without breaking their meaning, specially when it comes ZWJs, diacritics, etc.

You can subset a font like Noto to serve your languages, but it will come pretty large. Note that for web, @font-face declarations can set a Unicode character range for each font file, so browser downloads those fonts only when necessary.

Re: The Fastest Google Fonts

#92

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

This is my approach too. For logo/slogan fonts, one can go ahead even subset the font.

It's probably a good idea to refresh the fonts off Google once or twice a year though. Although not often, these font file get updated.

Re: The Fastest Google Fonts

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

Don't get stuck optimizing a local maxima, which is very easy to do if you're using AB tests.

Surely if there is one thing we have learned from the culture of comparative testing in recent years, it is that assumption is the mother of all #$%& ups.

Everyone commenting in this discussion to the effect that all sites should use system default fonts is making a huge assumption that using other fonts does not have a material effect on anything that matters to the user and/or the site owner. And yet, both in industry and in academia, lots of research has been done that did observe changes in outcomes even from relatively subtle (at least to an untrained eye) changes in typography.

If someone wants to argue that they personally do not like web fonts then of course they are free to block them. Any major content blocker on their platform of choice will do this easily enough. But if someone wants to argue that everyone else should avoid web fonts, they had better bring data. In this entire discussion, I don't see much of that, only personal preferences and the odd anecdote about a bug in a specific situation.

Re: The Fastest Google Fonts

#94

Does anybody else block fonts? Not only is it wasteful for my mobile data plan, but I just have this suspicion that sooner than later they will be used as a vector for some kind of security issue.

Faster rendering, no layout jumping, heck yes. I block them on every platform, but it's especially helpful on mobile.

Re: The Fastest Google Fonts

#95
On allaboutberlin.com, I serve Google Fonts locally. Aside from the benefits mentioned in the article, it also makes HTTP2 server push possible. This means the font is pushed along with the page, without first having to parse the HTML and the CSS. It's significantly faster. There are fewer server round trips.

The website loads from start to finish in 200ms on my end (in Berlin of course). At this point, DNS and server distancs are bigger issues than what's on the page. I find the call for system fonts rather funny, because it's such a pointless sacrifice.

Another significant benefit is privacy. I don't like sending visitor information to third parties. I removed Google Fonts requests, and I'm working on removing Analytics. Once this is done, there won't be any third party requests on the page.

Re: The Fastest Google Fonts

#96
post #20
post #15

Earlier quoted context omitted.

That might change. Google are changing their search ranking metrics to include the new Core Web Vitals metrics[1]. One of those is "Cumulative Layout Shift", or how much the page changes the layout over time. Using a font that isn't performant will cause the page to render, and then to move around once the page loads, which could push your site down on Google's search results page. [1] https://webmasters.googleblog.c…

Has anyone ever suggested doing "progressive fonts"? I.e., start the font downloading before the page renders at all; have the font organized so the first thing that's received is the bounding boxes + kerning table + ligatures table (= enough to know how much space an inline flow of graphemes will take up); then load the page, with the page layout already settled, while loading the font itself in the background. Even…

Just HTTP2 Server Pushing a smaller set of fonts will do the job. I have a website with 6 font variants that loads in 200ms. It loads even faster once the fonts are cached.

Re: The Fastest Google Fonts

#97
post #72

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…

> They continue to be used everywhere because they offer a consistency that's impossible to get otherwise. That sounds backwards to me. Using standard fonts is how you achieve consistency. Using a custom font for just your webpage is not helping me (the user) get consistency at all. That's what 'standard' means. (Frequently, custom fonts also hurt readability, which is why I hit "reader mode" on nearly every webpage…

> Using standard fonts is how you achieve consistency.

If my web page downloads a font to a browser for that browser to use, every browser capable of downloading that font will use that font.

If my web page specifies a list of fonts that users may or may not have on their system, every browser may display a different font from that list (or even a font not from that list).

I suppose YMMV and all that, but I would say the first case is clearly giving a more consistent result than the second case. That doesn't make the second case "bad," per se, but on my system Hacker News is in Verdana and on different distributions of Linux it's in... shrug emoji? There's a Microsoft Core Fonts package floating around out there, but not everybody has it installed. And lately it's become fashionable to specify a font stack of "default system fonts," so Macs get San Francisco, Windows 7+ users get Segoe UI, etc. That's fine, and maybe it's exactly what you want... but don't call it "consistent."

I almost guarantee you have fonts on your system installed that you will not want me to use on a web page, and I can also almost guarantee you that there are a lot of pages out there that have "custom fonts" that are just fine. They're just fine! Nobody reads a web page set in Charter or Franklin Gothic or any other rational typeface for body text and screams in outrage at its illegibility.

Maybe there are designers out there who want to force terrible horrible no-good custom fonts down your throat because they want to make your reading experience worse. Maybe there are web pages set in Zapfino and Wingdings. I don't know. But when you say "custom fonts," I say "professional high-quality typeface that is consistent across all browsers." That's it. That's all I'm trying to give you.

Re: The Fastest Google Fonts

#98
post #26

Earlier quoted context omitted.

> But if you value your brand you will want the fonts to send the message that you want to be associated with your brand. That's an important point. Unfortunately loading custom fonts slows down the experience and when that happens it does tell me something about the brand. (It's likely the overhead of loading fonts is drowned out by the overhead of all the trackers, but I have those blocked which speeds the web up e…

Unfortunately loading custom fonts slows down the experience Unless someone has either gone totally overboard on the number of fonts or set their site up very badly, this is largely a non-issue in most markets today. The total weight of all web fonts on any site/app I've worked on recently was typically less than the largest single image on the home page, and loading those fonts from a well-configured CDN rarely took…

That's also my experience.

My self-hosted, cached, server-pushed fonts keep the total load time well under 500 milliseconds. I load 2 fonts in a total of 6 variants.

The 100kb responsive header is a much bigger bottleneck.

You can achieve much bigger savings with proper caching, gzipping, a fast server and a lightweight page than with system fonts.

Re: The Fastest Google Fonts

#99
post #92

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

This is my approach too. For logo/slogan fonts, one can go ahead even subset the font. It's probably a good idea to refresh the fonts off Google once or twice a year though. Although not often, these font file get updated.

> For logo/slogan fonts, one can go ahead even subset the font.

SVG is a nice option for logos. You can inline the SVG file directly into the HTML as well so there's no loading delay - especially useful for logos that need to be rendered immediately at the top of the page.

Re: The Fastest Google Fonts

#100

Does anybody else block fonts? Not only is it wasteful for my mobile data plan, but I just have this suspicion that sooner than later they will be used as a vector for some kind of security issue.

> I just have this suspicion that sooner than later they will be used as a vector for some kind of security issue.

You mean like being rendered into a canvas to get a high-entropy fingerprint of your device?

Post reply on HN