1. 10
  1.  

  2. 4

    https://github.com/Munter/subfont seem like a good alternative tool which probably would be easier to use - from what I can see.

    1. 1

      mm, this looks neat! I probably won’t switch tools at this point, but I’m happy this exists!

    2. 1

      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)

      1. 1

        caniuse suggests yes!

      2. 1

        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.

        1. 1

          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!

          1. 1

            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!