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