This summarises an experiment in attempting to subset a font (Inter) into multiple unicode ranges for smaller files if the UI only uses a subset of the supported characters. It's kind code splitting but for fonts :)
Background:
- Inter used to publish 'official' subsetted fonts, but they disabled it as it broke certain type feature substitutions like
ccmp
. I don't think that's that much of an issue, but useful to know
To run:
cd grafana/public/fonts
docker build . --tag grafana-font-subset
docker run --rm -v (pwd):/fonts grafana-font-subset -u $(whoami)