2021-08-09 00:26:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
cd "`dirname $0`/.."
|
2020-06-17 20:06:57 +00:00
|
|
|
[ -d venv ] && source venv/bin/activate
|
2021-08-09 00:26:47 +00:00
|
|
|
mkdir -p distr/ttf
|
|
|
|
rm -rf distr/ttf/*
|
2019-08-01 16:30:48 +00:00
|
|
|
|
|
|
|
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}
|
2021-12-03 16:47:48 +00:00
|
|
|
ttfautohint --no-info --ignore-restrictions ${file} ${file}.hinted
|
2020-06-07 23:53:13 +00:00
|
|
|
mv ${file}.hinted ${file}
|
2020-06-12 13:18:24 +00:00
|
|
|
done
|