From 1f9712ee42d3d0e6a3acdd761465e76e3f17460f Mon Sep 17 00:00:00 2001 From: Miguel Sousa Date: Sun, 11 Feb 2018 02:27:59 -0800 Subject: [PATCH] Add build commands for variable TTFs --- buildVFs.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/buildVFs.sh b/buildVFs.sh index 5a78f59fe6..6410504627 100755 --- a/buildVFs.sh +++ b/buildVFs.sh @@ -32,6 +32,22 @@ sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf 1> /dev/null "$addSVG" $rom/$ro_name.otf svg "$addSVG" $itm/$it_name.otf svg +# build variable TTFs +fontmake -m $rom/$ro_name.designspace -o variable --production-names +fontmake -m $itm/$it_name.designspace -o variable --production-names + +# use cmap, DSIG, name, OS/2, hhea, post, SVG, and STAT tables from OTFs +sfntedit -x cmap=$rom/.tb_cmap,DSIG=$rom/.tb_DSIG,name=$rom/.tb_name,OS/2=$rom/.tb_os2,hhea=$rom/.tb_hhea,post=$rom/.tb_post,SVG=$rom/.tb_SVG,STAT=$rom/.tb_STAT $rom/$ro_name.otf 1> /dev/null +sfntedit -a cmap=$rom/.tb_cmap,DSIG=$rom/.tb_DSIG,name=$rom/.tb_name,OS/2=$rom/.tb_os2,hhea=$rom/.tb_hhea,post=$rom/.tb_post,SVG=$rom/.tb_SVG,STAT=$rom/.tb_STAT $rom/$ro_name.ttf 1> /dev/null +sfntedit -x cmap=$itm/.tb_cmap,DSIG=$itm/.tb_DSIG,name=$itm/.tb_name,OS/2=$itm/.tb_os2,hhea=$itm/.tb_hhea,post=$itm/.tb_post,SVG=$itm/.tb_SVG,STAT=$itm/.tb_STAT $itm/$it_name.otf 1> /dev/null +sfntedit -a cmap=$itm/.tb_cmap,DSIG=$itm/.tb_DSIG,name=$itm/.tb_name,OS/2=$itm/.tb_os2,hhea=$itm/.tb_hhea,post=$itm/.tb_post,SVG=$itm/.tb_SVG,STAT=$itm/.tb_STAT $itm/$it_name.ttf 1> /dev/null + +# use GDEF, GPOS, and GSUB tables from TTFs +sfntedit -x GDEF=$rom/.tb_GDEF,GPOS=$rom/.tb_GPOS,GSUB=$rom/.tb_GSUB $rom/$ro_name.ttf 1> /dev/null +sfntedit -a GDEF=$rom/.tb_GDEF,GPOS=$rom/.tb_GPOS,GSUB=$rom/.tb_GSUB $rom/$ro_name.otf 1> /dev/null +sfntedit -x GDEF=$itm/.tb_GDEF,GPOS=$itm/.tb_GPOS,GSUB=$itm/.tb_GSUB $itm/$it_name.ttf 1> /dev/null +sfntedit -a GDEF=$itm/.tb_GDEF,GPOS=$itm/.tb_GPOS,GSUB=$itm/.tb_GSUB $itm/$it_name.otf 1> /dev/null + # delete build artifacts rm */Masters/.tb_* rm */Masters/master_*/*.*tf