This is a simple tool takes *.woff2
icon font and corresponding *.css
file and modifies *.woff2
file so that it only includes characters from *.css
file.
For instance, if you have a large font file (like beautiful Font Awesome) and only use a few icons - this tool will help you to reduce the whole file to just those few characters.
WOFF2 format is supported across all major evergreen browsers, so this tool only supports WOFF2 and ignores anything else.
Before using this, make sure you have Docker installed on your machine.
Modifies font file to only include characters from specified CSS file.
Examples:
docker run --rm -v /path/to/font.woff2:/font.woff2 -v /path/to/style.css:/style.css nazarpc/subset-font
Feel free to create issues and send pull requests (for big changes create an issue first and link it from the PR), they are highly appreciated!
Free Public License 1.0.0 / Zero Clause BSD License