Created
May 3, 2021 02:32
-
-
Save rileyjshaw/6b71d994646bd2362f766aa0c3e0a495 to your computer and use it in GitHub Desktop.
A one-liner to convert a folder of TTFs (also works with OTFs) to WOFF and WOFF2
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
mkdir -p woff && for f in *.ttf; do sfnt2woff "$f"; woff2_compress "$f"; done && mv *.woff* woff | |
Inelegant but working way to generate .woff
fallbacks from a directory of .woff2
files. Careful using this in a folder with .ttf
s in it, it’ll delete them all.
for f in *.woff2; do woff2_decompress "$f"; sfnt2woff "${f%.*}.ttf"; done && rm *.ttf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With gliffhanger: