Open fabswt opened 4 years ago
My use case involved modifying existing CSS, so I didn't consider extracting any lines.
In general there is a rather simple code in subset.php
file that you can modify or use as an inspiration to solve your own unique use case.
It basically uses regular expression to identify used unicode characters and uses glyphIgo CLI tool with generated input to process a font file. woff2_decompress
and woff2_compress
tools are used for transformations to and from TTF font file format.
Hi, Played with docker-subset-font today.
I used this for the CSS file:
And sure enough, after running the command, e.g.:
…then
fa-solid-900.woff2
was updated and contained only the one icon mentioned in the CSS.My question is:
How do you go about extracting the necessary CSS lines from the file?
There are 70 icons I'd like to include in the Font Awesome Pro subset and extracting them one by one from
all.css
is just tedious.Also, did you consider maybe using a different file for the input and output woff2, to avoid having to copy-paste it all the time?
Thank you.