1
1
mirror of https://github.com/i-tu/Hasklig.git synced 2024-09-11 10:36:46 +03:00

Improvements to build script

This commit is contained in:
Miguel Sousa 2017-08-09 00:10:35 -07:00
parent 7b6d3941a2
commit a0856214eb
2 changed files with 14 additions and 7 deletions

View File

@ -106,7 +106,7 @@ def processFontFile(fontFilePath, svgFilePathsList):
os.remove(fontFilePath) os.remove(fontFilePath)
os.rename(newFontFilePath, 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): def validateSVGfiles(svgFilePathsList):

View File

@ -3,6 +3,9 @@
# path to Python script that adds the SVG table # path to Python script that adds the SVG table
addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py
# path to UVS file
UVS=$(cd $(dirname "$0") && pwd -P)/uvs.txt
rom=Roman/Masters rom=Roman/Masters
itm=Italic/Masters itm=Italic/Masters
@ -10,18 +13,20 @@ ro_name=SourceCodeVariable-Roman
it_name=SourceCodeVariable-Italic it_name=SourceCodeVariable-Italic
# build variable OTFs # build variable OTFs
buildMasterOTFs $rom/$ro_name.designspace buildMasterOTFs --mkot -ci,"$UVS" $rom/$ro_name.designspace
buildCFF2VF $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 buildCFF2VF $itm/$it_name.designspace
# extract and subroutinize the CFF2 table # extract and subroutinize the CFF2 table
tx -cff2 +S +b -std $rom/$ro_name.otf $rom/.tb_cff2 echo 'Subroutinizing' $rom/$ro_name.otf
tx -cff2 +S +b -std $itm/$it_name.otf $itm/.tb_cff2 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 # replace CFF2 table with subroutinized version
sfntedit -a CFF2=$rom/.tb_cff2 $rom/$ro_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 sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf 1> /dev/null
# add SVG table to variable OTFs # add SVG table to variable OTFs
"$addSVG" $rom/$ro_name.otf svg "$addSVG" $rom/$ro_name.otf svg
@ -30,3 +35,5 @@ sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf
# delete build artifacts # delete build artifacts
rm */Masters/.tb_* rm */Masters/.tb_*
rm */Masters/master_*/*.*tf rm */Masters/master_*/*.*tf
echo "Done"