From a0856214eb571ebe097c1be3460b222b58495488 Mon Sep 17 00:00:00 2001 From: Miguel Sousa Date: Wed, 9 Aug 2017 00:10:35 -0700 Subject: [PATCH] Improvements to build script --- addSVGtable.py | 2 +- buildVFs.sh | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/addSVGtable.py b/addSVGtable.py index 28f7bb6c06..e06b2660e0 100755 --- a/addSVGtable.py +++ b/addSVGtable.py @@ -106,7 +106,7 @@ def processFontFile(fontFilePath, svgFilePathsList): os.remove(fontFilePath) os.rename(newFontFilePath, fontFilePath) - print >> sys.stdout, "\nSVG table successfully added to %s" % fontFilePath + print >> sys.stdout, "SVG table successfully added to %s" % fontFilePath def validateSVGfiles(svgFilePathsList): diff --git a/buildVFs.sh b/buildVFs.sh index 591375536e..5a78f59fe6 100755 --- a/buildVFs.sh +++ b/buildVFs.sh @@ -3,6 +3,9 @@ # path to Python script that adds the SVG table addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py +# path to UVS file +UVS=$(cd $(dirname "$0") && pwd -P)/uvs.txt + rom=Roman/Masters itm=Italic/Masters @@ -10,18 +13,20 @@ ro_name=SourceCodeVariable-Roman it_name=SourceCodeVariable-Italic # build variable OTFs -buildMasterOTFs $rom/$ro_name.designspace +buildMasterOTFs --mkot -ci,"$UVS" $rom/$ro_name.designspace buildCFF2VF $rom/$ro_name.designspace -buildMasterOTFs $itm/$it_name.designspace +buildMasterOTFs --mkot -ci,"$UVS" $itm/$it_name.designspace buildCFF2VF $itm/$it_name.designspace # extract and subroutinize the CFF2 table -tx -cff2 +S +b -std $rom/$ro_name.otf $rom/.tb_cff2 -tx -cff2 +S +b -std $itm/$it_name.otf $itm/.tb_cff2 +echo 'Subroutinizing' $rom/$ro_name.otf +tx -cff2 +S +b -std $rom/$ro_name.otf $rom/.tb_cff2 2> /dev/null +echo 'Subroutinizing' $itm/$it_name.otf +tx -cff2 +S +b -std $itm/$it_name.otf $itm/.tb_cff2 2> /dev/null # replace CFF2 table with subroutinized version -sfntedit -a CFF2=$rom/.tb_cff2 $rom/$ro_name.otf -sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf +sfntedit -a CFF2=$rom/.tb_cff2 $rom/$ro_name.otf 1> /dev/null +sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf 1> /dev/null # add SVG table to variable OTFs "$addSVG" $rom/$ro_name.otf svg @@ -30,3 +35,5 @@ sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf # delete build artifacts rm */Masters/.tb_* rm */Masters/master_*/*.*tf + +echo "Done"