dsh-font-subset
Cut a font down to the characters a page actually uses. `font_coverage` reports which characters a font is missing, before the cut turns them into tofu boxes; `font_subset` then emits a woff2 (or woff or ttf) containing only what the page needs. Measured on simhei.ttf - 9.3 MB to 3.5 KB for 24 distinct characters. Characters can be given directly, read from a file, or collected from an html/vue/js/ts/css tree.
Overview
Cut a font down to the characters a page actually uses. `font_coverage` reports which characters a font is missing, before the cut turns them into tofu boxes; `font_subset` then emits a woff2 (or woff or ttf) containing only what the page needs. Measured on simhei.ttf - 9.3 MB to 3.5 KB for 24 distinct characters. Characters can be given directly, read from a file, or collected from an html/vue/js/ts/css tree.
Installation
Version compatibility
Compatibility is unconfirmed. Check the project documentation for supported versions.