87 points · by supercucumber · 6y ago · 53 comments
It's no more difficult than serving any other asset. And if you're worried about privacy, then serving files locally removes any dependency on a third-party server at all (or two in this case).
But now, browsers don’t share caches between origins for privacy reasons (“hmm, judging by how fast these ten resources loaded (and how slowly these other thirty resources loaded), you had these ten in your cache; and such-and-such a sensitive site just happens to load those ten resources and none of the rest…”), so that reason has turned from a positive into a probable negative, because it’s having to look up another domain name and open a new TLS connection—though if you’re serving the resources with HTTP/1.1 it might still be faster coming from a different origin, if you’re loading enough resources.
After that, the main advantage of Google Fonts doing the CSS serving is that it varies the CSS it serves by user-agent, to give you what your browser will cope with best, whether it be EOT, TTF, WOFF, WOFF2, maybe they vary the response in other ways as well, I’m not sure. In practice, I think that benefit has run its course: I recommend that people don’t even bother with the bulletproof web fonts formula for supporting all the formats, but just serve woff2: fonts are fundamentally supposed to be optional (icon fonts are generally bad), and users of such ancient browsers as IE, EdgeHTML < 14, Firefox < 39, Chrome < 36 and Safari < 10/12 don’t need the fonts anyway.
So then, I say that the only thing that remains is the neat packaging of the font files, subsetting, &c. And I say copying the files and serving them yourself is overall probably a very wise idea.
I served my own fonts, but subsetting those font aren't trivial matter. Personally I just grabbed the unicode range that Google Font used and generate my own subsets, but it is not that trivial.
(The reason I served my own font is actually because some font on Google Font are not up to dated, and I actually abuse the unicode-range to use different fonts for different scripts)
I didn't heard about this thing until today, are you sure that it is already implemented in all major browsers? I have found this source [1] but for what I can tell, at the moment this feature is behind a flag in chromium and firefox (maybe it is already implemented in Safari).
And because caches are no longer shared (unfortunately), I've started subsetting fonts myself to trim them down when possible.
This is a perfect sort of thing as a Caddy plugin too. Or a CDN provider to provide this out of the box.
The CloudFlare people could do this in a weekend probably and I'd happily sign up because I'm less concerned about my privacy with CF than with Google.
But is this even an issue? If you declare the 4 different formats, won't the browser know to request the best one automatically?
I am aware of them updating fonts that they commissioned. But I know of multiple cases where Google Fonts has been serving versions of fonts that are five or more years out of date, sometimes even broken by Google Fonts. Crimson Text I can kinda understand them not fixing completely, because fixing it would have changed character positioning (thus breaking people’s careful alignment to work around the Google-Fonts-introduced bugs). But there have been other cases where that didn’t apply: metrics were the same, but they just wouldn’t update the font. Might have been PT Serif? Lato? I can’t remember, it’s years since I last cared about Google Fonts.
In short: updating the fonts is not all it’s cracked up to be; Google mostly just doesn’t, and half the time you actually wouldn’t want the font updates anyway—depends on the nature of the update.
Do you have a source for this? IANAL but if a Google font was disallowed for a jurisdiction, Google would be in legal trouble for advertising/hosting it on their own site, but that would be a separate case. I seriously doubt they'd share any of the liability for you using it on your site.
Hosting assets like fonts or javascript on the same host is not only better for privacy, it's also more secure (no thirdparty can mess with your content) and contrary to popular belief also faster in a modern web environment.
What percentage of the data transferred is a font or JavaScript library?
If it's like 30% (I don't know, just guessing) then that's a portion of bandwidth that could have been used to serve users the site content.
My guess is someone added this tool for other tools to use. There's no way this is being used on the production wikis.
That's precisely what it's for; and there's a cdnjs mirror as well, for the same reason.
The tool SkyFonts (from Monotype foundry and recommended by stores like MyFonts.com) as one of several features as a "cloud font updater" includes a "download the top X Google Fonts" option. It's an easy way to get a faster page load experience on the web.
The problem to watch out for, and it is why it's not generally recommended, is that font loading times are already in the wild a privacy issue (there are fingerprinting tools out there that try to download fonts and draw them in an off-screen CANVAS, using "too fast" as a deanonymization vector).
The best bet to generally help the web at large would be a browser or OS vendor to start installing the Top X fonts from Google Fonts out of the box.
where can I find the wiki CDN network map?
I'm wondering a bit about your new zealand redirect, as there is no colocation site in new zealand on that map at least.
Even if those were somehow the 7 "best" fonts in all of the world, there's still a need to support external fonts because fonts are a tool for creative expression. Creative expression might not always be what you want from the web, but as a 90s Web fan, a web without creative expression would be a terrible web.
Maybe, but using google fonts is as uncreative as you can get.