1
0
Fork 0
mirror of synced 2024-05-21 04:53:25 +12:00
FiraCode/script/build_ttf
2020-06-17 22:13:23 +02:00

24 lines
670 B
Bash
Executable file

#!/bin/bash -euo pipefail
[ -d venv ] && source venv/bin/activate
args=( "$@" )
default_weights=( "Light" "Regular" "Retina" "Medium" "SemiBold" "Bold" )
weights=( "${args[@]:-"${default_weights[@]}"}" )
for weight in "${weights[@]}"; do
file=distr/ttf/FiraCode-${weight}.ttf
echo "Making " ${file}
rm -rf ${file}
fontmake -g FiraCode.glyphs -o ttf --output-dir distr/ttf -i "Fira Code ${weight}"
echo "Fixing DSIG in " ${file}
gftools fix-dsig --autofix ${file}
echo "TTFautohint " ${file}
ttfautohint -I ${file} ${file}.hinted --stem-width-mode nnn --composites
#--windows-compatibility
mv ${file}.hinted ${file}
done