Created
January 1, 2021 11:28
-
-
Save wolkenschieber/6d5bc93a99d8f918f82953310b232824 to your computer and use it in GitHub Desktop.
Revisions
-
wolkenschieber created this gist
Jan 1, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/usr/bin/env bash set -o nounset shopt -s nullglob function convertFont() { fontfile="${1}" filename=$(basename -- "$fontfile") extension="${filename##*.}" filename="${filename%.*}" targetfontfile="${filename}.ttf" echo "Converting ${fontfile} to ${targetfontfile}" fontforge -lang=ff -c 'Open($1); Generate($2)' "${fontfile}" "${targetfontfile}" } function main() { for wofffile in *.woff; do convertFont "${wofffile}" done; for woff2file in *.woff2; do convertFont "${woff2file}" done; } main