3 ms·
This is pretty cool and seems like a useful tool! For my personal site, i switched from using Open Sans through Google Fonts, to downloading all of the charset
by KronisLV 5y ago
This is pretty cool and seems like a useful tool!
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/ 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-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).
- WorldMaker 5y agoOne of the biggest things we could do as a community is normalize local installs of major font libraries (say, top 50 of Google Fonts, for instance). It's relatively easy to do, and easy to automate, and could be done with OS or browser updates. 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.)
- jsmith99 5y agoThe Decentraleyes extension supplies local copies of popular CDN resources but it doesn't support Google Fonts yet unfortunately - this sounds like the obvious way to implement it.