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