Google Webfonts Helper – Self-Hosting Google Fonts
google-webfonts-helper.herokuapp.com
google-webfonts-helper.herokuapp.com
The trouble I find with relying on many disparate 3rd party CDNs is the unreliable response times, especially if any of your users are outside of the US. From Australia we often find a site serving locally in under 30ms, then sit and wait for 300ms per request for all the third party assets to load.
The first thing I do when looking at optimizing the felt performance of a website is move everything back to the application host, and then add a single CDN if the traffic is likely to be high.
But yeah, post-HTTP/2 and privacy-related CDN sandboxing, especially, it is further and further from good advice.
Put bluntly: HTTP/2 and partitioned caches means using a CDN is flat out worse than self-hosting.
Edit: CloudFront, not CloudFlare.
Serving lots of little files even with HTTP2 has all the same problems, lots of little requests make the likelihood of hitting a bottlenecked CDN node more likely. I'm not sure where the idea of serving JS as small loaded in modules on the frontend came from, but I've never seen it increase the feel of a website. Single monolithic JS file sites almost always feel better and load faster. It might be better to just process the small modules to be inline with the HTML, instead of using a dozen network requests.
True, on a fast network, where you can get the whole JS file over the wire without significant latency or download time.
For slower networks, a single monolithic JS file might not load before the user gets frustrated and navigates away.
However, once distinction is font hinting data [2]. Google Fonts serve different files based for Windows vs Mac. The windows variations have hinting included.
[1]: https://rwt.io/typography-tips/progressive-font-enrichment-r... [2]: https://www.typotheque.com/articles/hinting
ctrl-F for "fingerpr": 0 matches
I skimmed the article and it looks like the only thing that's logged is your IP? Calling that "browser identification" seems like a stretch.
This was confirmed again on Monday by a German court [1] (German link) for the case where they loaded something from Akamai on a university library website. This was specifically deemed problematic since the implicit connection was into the US.
Basically, this means if you operate in Europe you can’t use US cloud providers at all before user consent.
[1] https://verwaltungsgerichtsbarkeit.hessen.de/pressemitteilun...
- Avoid Google tracking / cookies
- Offline access (software for museums / exhibitions)
- Development even while offline
- Fonts can get updated, and updates sometimes affect letter geometry. I'd like to test before updating things to my users.
However, word of warning: I found at least one broken font. "Exo 2" has noticeable clipped sections where two curves overlap. Make sure to check your fonts... specially since, if you have the TTF downloaded from Google Fonts installed in the computer you're testing with, you might not see the text as your users do.
(Possibly Google Fonts is serving different CSS specific to macOS user agents as a current workaround.)
Fontsource (which is similar to this tool but packaged as npm packages and I found mentioned in another thread here) is similarly aware of the issue and suggests the current macOS workaround is to enable it as a Variable Font with slightly different CSS: https://github.com/fontsource/fontsource/issues/243
(They don't enable fonts as variable fonts in their default CSS because of different browser issues with variable fonts.)
Google's gstatic.com service rejects requests from the proxy service I use. This causes websites that use Google-hosted fonts to load with invisible text then show the text after a few seconds. This makes browsing slow. It affects the Flutter & Dart docs.
When Google's gstatic.com blocks proxy users, they break sites and apps that use code hosted on it: Google account login, Google Cloud Console, Google Maps, Google Search, search in all Google apps, etc. I'm a paying customer of Google Apps for Business and was unable to use their support site to contact them. To contact Google Support, you must get a Support PIN code. The PIN only lasts an hour, so the one I wrote down last year doesn't work anymore. It seems that there is no way for a proxy user to contact Google Support to report problems logging in. I'm transitioning away from Google products.
Google Fonts and all the free fonts that ship in Debian/Ubuntu are as close to a de facto standard as anything on the internet. Why not just lazy load them on first launch of a browser (or first use on a webpage) and cache them forever?
Now, the cache is per-site.[1] The arguments for partitioning the cache apply to fonts just as much as to other resources.
There have been thoughts[2] and proposals[3] around ways to make shared libraries without running into those issues, but nothing has really materialised AFAIK.
The broad issue is that 'just lazy load on first use' creates privacy reasons, and the idea of picking a list of popular resources to cache on launch never really goes anywhere.
[1]: https://developers.google.cn/web/updates/2020/10/http-cache-...
[2]: https://hillbrad.github.io/sri-addressable-caching/sri-addre...
For my personal site, i switched from using Open Sans through Google Fonts, to downloading all of the charsets (latin/latin-ext) and varieties (regular/bold) that i needed, setting up the fonts with @font-face and src, and then just serving them out of the same container that i do the rest of the site assets. So essentially now i can run everything i need with a single Docker container. I even did the same for the Material Icons font that my site uses (due to using the Materialize library, because that's what i felt like using). Admittedly doing all of that manually wasn't exactly a fun experience.
The downside of this is that doing so increases the total page size ~2x for my simple homepage, around 155 KB out of the 275 KB is just fonts: https://gtmetrix.com/reports/kronis.dev/EIHsevSv/ To that end, i find it incredibly odd that we as an industry don't seem to worry much about the size of the fonts that we use vs the characters that are supported by them. This probably isn't all that relevant with Open Sans in particular, but some of the other popular fonts can result in even larger download sizes, even if you don't need icon fonts or anything of the sort, or when you want to use more than just 1 font per page, for example, a different one for headers.
The closest that i've found to that is this article, "Smallest (file size) Google Web Fonts": http://www.oxfordshireweb.com/smallest-file-size-google-web-...
But without that being too big of a focus, it feels like at the end of the day one must consider just using the built in web safe fonts, or use bunches of bandwidth for oftentimes no good reason (in my case, i wanted the typography to be a bit more consistent with my blog, which already uses Open Sans, whereas companies usually care about branding and so on).
The chicken/egg problem though is that we don't want to encourage individual users to install fonts because that becomes a privacy deanonimization vector (existing trackers in the wild will request random Google Fonts and time roughly how long it takes for them to paint in an offscreen canvas) and it really needs to be a OS-wide or browser-wide initiative (like the original web safe fonts initiative that gave us Georgia/Verdana/Comic Sans MS/et al "everywhere").
(Though if an individual wants to do it, Skyfonts is an easy to find app that has a "download the Top X Google Fonts" option that's a quick choose your X and go and can make your browser experience noticeably faster/better without so much bandwidth spent on fonts.)
i'm not even considering linux here.
The good thing about transfonter is it writes all the horrible @font-face css for you, and also converts uploaded fonts into WOFF2 for example.
FontSquirrel also has a similar generator and converter which in theory gives more detailed control over which features to keep, although in practice an attempt to subset Fira Sans or FiraGO produced a font with broken ligatures, so not all that useful for me, either.
In the end I've ended up just subsetting and converting the font myself using the Python FontTools.
Do you have a source on that? The individual details might vary, but generally speaking the Google Fonts repo is made up of permissively-licensed fonts. [0]