zachleat / glyphhanger

Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
https://www.zachleat.com/web/glyphhanger/
MIT License
691 stars 20 forks source link

Expected `--subset='*.ttf'` to subset per font-family - with a seperate unicode range calculated per font-family #10

Open universemaster opened 2 years ago

universemaster commented 2 years ago

I suggest either a documentation change or functionality change.

I expected the command glyphhanger ./test.html --formats=woff2 --subset='*.ttf' to subset using a calculated unicode range per font family.

However, to get this functionality it appears that I need to run glyphhanger once per font-family like the below which significantly increases my build time:

glyphhanger ./test.html --subset='KaTeX_Main*.ttf' --formats=woff2 --family='KaTeX_Main';
glyphhanger ./test.html --subset='KaTeX_SansSerif*.ttf' --formats=woff2 --family='KaTeX_SansSerif';
glyphhanger ./test.html --subset='KaTeX_Typewriter*.ttf' --formats=woff2 --family='KaTeX_Typewriter';
glyphhanger ./test.html --subset='KaTeX_Math*.ttf' --formats=woff2 --family='KaTeX_Math';
glyphhanger ./test.html --subset='KaTeX_AMS*.ttf' --formats=woff2 --family='KaTeX_AMS';
glyphhanger ./test.html --subset='KaTeX_Caligraphic*.ttf' --formats=woff2 --family='KaTeX_Caligraphic';
glyphhanger ./test.html --subset='KaTeX_Fraktur*.ttf' --formats=woff2 --family='KaTeX_Fraktur';
glyphhanger ./test.html --subset='KaTeX_Script*.ttf' --formats=woff2 --family='KaTeX_Script';
glyphhanger ./test.html --subset='KaTeX_Size1*.ttf' --formats=woff2 --family='KaTeX_Size1';
glyphhanger ./test.html --subset='KaTeX_Size2*.ttf' --formats=woff2 --family='KaTeX_Size2';
glyphhanger ./test.html --subset='KaTeX_Size3*.ttf' --formats=woff2 --family='KaTeX_Size3';
glyphhanger ./test.html --subset='KaTeX_Size4*.ttf' --formats=woff2 --family='KaTeX_Size4'

Have I understood the functionality correctly?