build_variable 634 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash -euo pipefail
  2. cd "`dirname $0`/.."
  3. source venv/bin/activate
  4. DIR=distr/variable_ttf
  5. FILE=FiraCodeFixed-VF.ttf
  6. rm -rf $DIR/$FILE
  7. fontmake -g FiraCode.glyphs -o variable --output-dir $DIR
  8. cd distr/variable_ttf
  9. # fix variable font metadata – very important
  10. gftools fix-vf-meta $FILE
  11. mv $FILE.fix $FILE
  12. # other fixes for metadata and hinting
  13. gftools fix-nonhinting $FILE $FILE.fix
  14. mv $FILE.fix $FILE
  15. gftools fix-gasp --autofix $FILE
  16. mv $FILE.fix $FILE
  17. gftools fix-dsig --autofix $FILE
  18. # cleanup of temp files
  19. rm -rf *-gasp.ttf
  20. # TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)