Created
March 9, 2021 14:05
-
-
Save barning/01c960130acfa6aad7ff1ad4696bf5a4 to your computer and use it in GitHub Desktop.
Convert from Woff2 to Woff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Thanks to https://github.com/jens-t | |
# https://rsms.me/fonttools-docs/subset.html | |
# https://unicode-table.com/en/#basic-latin | |
# sudo pip install fonttools brotli | |
for FILENAME in ./*.woff2; do | |
NAME=$(echo `basename $FILENAME` | awk -F"." '{print $1}') | |
pyftsubset $FILENAME --flavor=woff --output-file=./woff/$NAME.woff | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment