https://github.com/Munter/subfont seem like a good alternative tool which probably would be easier to use - from what I can see.
mm, this looks neat! I probably won’t switch tools at this point, but I’m happy this exists!
Thanks for the article, it’s a very neat approach!
An alternative I always wanted to try but didn’t get around to is using unicode-range and slicing up the font so that the browser can load more glyphs on demand if it needs to. I’m curious if this works as advertised in most browsers (i.e. font files are not downloaded unless there’s some char in their unicode range)
caniuse suggests yes!
Thanks for this!! I took this and adapted it into a slightly simpler approach (just trimmed all my fonts to only include ASCII characters rather than doing your fancy collection mechanism for those) and knocked 70% off of my fonts payload size, which for mobile was a big deal since the images are sized smaller there.
I have been investing quite some time for my static website to be as lightweight as possible for the client (for instance, rendering equations off-line), and I noticed the same thing.
I will probably try to see if I can use this approach too. Thanks for sharing!
how are you calculating the tradeoff between rendering equations in the browser vs shipping images to the frontend? Are the images truly tiny, beating the size of mathjax (or whatever you use?) Also curious how you’re keeping this accessible!