Browse Source

Fixed STAT table in FiraCode-VF.ttf (closes #1054)

Nikita Prokopov 4 years ago
parent
commit
d41386567b
4 changed files with 26 additions and 26 deletions
  1. 1 0
      CHANGELOG.md
  2. BIN
      distr/variable_ttf/FiraCode-VF.ttf
  3. 7 11
      script/build
  4. 18 15
      script/build_variable

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
 - Vertically-aligned colons, greater/less signs #980 #1061
 - Make U+2388 Helm Symbol `⎈` single-width #1036
 - Disable `=/` because of conflicts with paths `PATH=/...` #1056
+- Fixed STAT table in FiraCode-VF.ttf #1054
 
 #### 4.0 (May 18, 2020)
 

BIN
distr/variable_ttf/FiraCode-VF.ttf


+ 7 - 11
script/build

@@ -6,28 +6,24 @@ source venv/bin/activate
 # VARIABLE FONT ==============================================================
 
 # variable font
-rm -rf distr/variable_ttf
-fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
-
-# -------------------------------------------------------------
-# fix variable font metadata as needed ------------------------
-
 firaCodeVF=distr/variable_ttf/FiraCode-VF.ttf
 
+rm -rf $firaCodeVF
+fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
+
 # fix variable font metadata – very important
 gftools fix-vf-meta $firaCodeVF
+mv $firaCodeVF.fix $firaCodeVF
 
 # other fixes for metadata and hinting
 gftools fix-nonhinting $firaCodeVF $firaCodeVF
 gftools fix-gasp --autofix $firaCodeVF
+mv $firaCodeVF.fix $firaCodeVF
+
 gftools fix-dsig --autofix $firaCodeVF
 
 # cleanup of temp files
-tempFiles=$(ls distr/variable_ttf/*.fix && ls distr/variable_ttf/*-gasp*)
-for temp in $tempFiles
-do
-    rm -rf $temp
-done
+rm -rf distr/variable_ttf/*-gasp*
 
 # TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)
 

+ 18 - 15
script/build_variable

@@ -1,26 +1,29 @@
-#!/bin/bash -e
+#!/bin/bash -euo pipefail
 
-rm -rf distr/variable_ttf
-fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
+cd "`dirname $0`/.."
 
-# -------------------------------------------------------------
-# fix variable font metadata as needed ------------------------
+DIR=distr/variable_ttf
+FILE=FiraCode-VF.ttf
 
-firaCodeVF=distr/variable_ttf/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 $firaCodeVF
+gftools fix-vf-meta $FILE
+mv $FILE.fix $FILE
 
 # other fixes for metadata and hinting
-gftools fix-nonhinting $firaCodeVF $firaCodeVF
-gftools fix-gasp --autofix $firaCodeVF
-gftools fix-dsig --autofix $firaCodeVF
+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
-tempFiles=$(ls distr/variable_ttf/*.fix && ls distr/variable_ttf/*-gasp*)
-for temp in $tempFiles
-do
-    rm -rf $temp
-done
+rm -rf *-gasp.ttf
 
 # TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)