2020-06-07 23:53:13 +00:00
|
|
|
#!/bin/bash -euo pipefail
|
2019-08-01 16:30:48 +00:00
|
|
|
|
|
|
|
source venv/bin/activate
|
|
|
|
|
|
|
|
args=( "$@" )
|
2020-04-05 21:25:07 +00:00
|
|
|
default_weights=( "Light" "Regular" "Retina" "Medium" "SemiBold" "Bold" )
|
2019-08-01 16:30:48 +00:00
|
|
|
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}
|
2020-06-07 23:53:13 +00:00
|
|
|
ttfautohint -I ${file} ${file}.hinted --stem-width-mode nnn --composites --windows-compatibility
|
|
|
|
mv ${file}.hinted ${file}
|
2019-08-01 16:30:48 +00:00
|
|
|
done
|