2021-08-09 12:26:47 +12:00
|
|
|
#!/bin/bash
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
cd "`dirname $0`/.."
|
2020-06-18 08:06:57 +12:00
|
|
|
[ -d venv ] && source venv/bin/activate
|
2021-08-09 12:26:47 +12:00
|
|
|
mkdir -p distr/ttf
|
|
|
|
rm -rf distr/ttf/*
|
2019-08-02 04:30:48 +12:00
|
|
|
|
|
|
|
args=( "$@" )
|
2020-04-06 09:25:07 +12:00
|
|
|
default_weights=( "Light" "Regular" "Retina" "Medium" "SemiBold" "Bold" )
|
2019-08-02 04:30:48 +12: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-04 05:47:48 +13:00
|
|
|
ttfautohint --no-info --ignore-restrictions ${file} ${file}.hinted
|
2020-06-08 11:53:13 +12:00
|
|
|
mv ${file}.hinted ${file}
|
2020-06-13 01:18:24 +12:00
|
|
|
done
|