diff --git a/googlefonts-qa/scripts/build.sh b/googlefonts-qa/scripts/build.sh index 087f243..cc0c6e1 100755 --- a/googlefonts-qa/scripts/build.sh +++ b/googlefonts-qa/scripts/build.sh @@ -42,4 +42,22 @@ mkdir -p distr/woff2 woff2s=$(ls distr/*/*.woff2) for woff2 in $woff2s; do mv $woff2 distr/woff2/$(basename $woff2) +done + +# ============================================================================ +# Build woff fonts =========================================================== + +# requires sfnt2woff-zopfli (https://github.com/bramstein/homebrew-webfonttools) + +rm -rf distr/woff + +ttfs=$(ls distr/*/*.ttf) +for ttf in $ttfs; do + sfnt2woff-zopfli $ttf +done + +mkdir -p distr/woff +woffs=$(ls distr/*/*.woff) +for woff in $woffs; do + mv $woff distr/woff/$(basename $woff) done \ No newline at end of file