1
0
Fork 0
mirror of synced 2024-06-01 10:20:25 +12:00
FiraCode/script/build_variable

32 lines
644 B
Plaintext
Raw Normal View History

#!/bin/bash -euo pipefail
2020-04-10 04:56:19 +12:00
cd "`dirname $0`/.."
2020-04-10 04:56:19 +12:00
2020-06-18 08:06:57 +12:00
[ -d venv ] && source venv/bin/activate
2020-06-09 02:10:00 +12:00
DIR=distr/variable_ttf
FILE=FiraCode-VF.ttf
2020-04-10 04:56:19 +12:00
rm -rf $DIR/$FILE
fontmake -g FiraCode.glyphs -o variable --output-dir $DIR
cd distr/variable_ttf
2020-04-10 04:56:19 +12:00
# fix variable font metadata very important
gftools fix-vf-meta $FILE
mv $FILE.fix $FILE
2020-04-10 04:56:19 +12:00
# other fixes for metadata and hinting
gftools fix-nonhinting $FILE $FILE.fix
mv $FILE.fix $FILE
gftools fix-gasp --autofix $FILE
mv $FILE.fix $FILE
gftools fix-dsig --autofix $FILE
2020-04-10 04:56:19 +12:00
# cleanup of temp files
rm -rf *-gasp.ttf
2020-04-10 04:56:19 +12:00
# TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)