nhtua
8/7/2015 - 9:52 AM

Convert multiple fonts to woff

Convert multiple fonts to woff

#! /bin/bash
# Put this file into woff tool's dir, which was compiled before
# To convert multiple file, type:
# ./run_woff.sh /path/to/fonts/dir <format(otf|ttf)>
fontdir=$1
fontext=$2
files=($fontdir/*.$2)
for item in ${files[*]}
do
        ./woff2_compress  $item
        printf "Convert %s to woff success. \n" $item
done
printf "Convert completed!\n"