subfont
▻https://www.npmjs.com/package/subfont
A command line tool to statically analyse your page in order to generate the most optimal web font subsets, then inject them into your page.
Speed up your time to first meaningful paint by reducing the web font payload and critical path to the font files.
Subfont will:
– Automatically figure out what characters are used from each font
– Create an exact subset of used characters of each font
– Add the font subsets to your pages with browser preload hints for reduced time to first meaningful paint
– Give the subsetted fonts new names and prepend them in front of the original fonts in your font-family definitions (enables missing glyph fallback)
– Async load your original @font-face declaring CSS at the bottom of your page, moving it off the critical path
Perso c’est pas ma priorité, mais je vois souvent passer des demandes à ce sujet.