1
0
Fork 0
mirror of synced 2024-05-17 11:03:33 +12:00
FiraCode/script/build_variable
Nikita Prokopov 63c6434ab7 Fira Code v5
2020-06-08 16:10:00 +02:00

32 lines
629 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash -euo pipefail
cd "`dirname $0`/.."
source venv/bin/activate
DIR=distr/variable_ttf
FILE=FiraCode-VF.ttf
rm -rf $DIR/$FILE
fontmake -g FiraCode.glyphs -o variable --output-dir $DIR
cd distr/variable_ttf
# fix variable font metadata very important
gftools fix-vf-meta $FILE
mv $FILE.fix $FILE
# 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
# cleanup of temp files
rm -rf *-gasp.ttf
# TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)