14
0
mirror of https://github.com/belluzj/fantasque-sans.git synced 2024-11-05 08:51:32 +01:00
fantasque-sans/Scripts/generate-font-variants

17 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPTS=$(cd "$(dirname $0)"; pwd)
# Generate all possible variants of the font statically
if ! type fontforge &> /dev/null; then echo "ERROR: Missing dependency: fontforge" 1>&2; exit 1; fi
path="$(pwd)/$1"
basename=$(basename "$path" .sfdir)
output_dir=$2
echo -e "\e[1;37mGenerating ${basename} variants... \e[0m"
fontforge --quiet -lang=py -script "$SCRIPTS/build.py" 1 0 "$path" "$output_dir" || exit 1
echo -e "\e[1;32m${basename} OK.\e[0m"