From dabf359b48bc31113aaa0f624db3a17eb0785e2f Mon Sep 17 00:00:00 2001 From: Paul Picazo Date: Mon, 24 Sep 2012 23:01:51 -0700 Subject: [PATCH] When building the fonts using included build script, create artifacts outside of the main source tree. --- build.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 94a4b9237e..c36092439d 100755 --- a/build.sh +++ b/build.sh @@ -1,13 +1,15 @@ #!/bin/sh -# Build OTFs -for f in $(find . -name 'font.pfa') -do - makeotf -f $f -r -done +family=SourceCodePro +weights=('Black' 'Bold' 'ExtraLight' 'Light' 'Regular' 'Semibold') -# Build TTFs -for f in $(find . -name 'font.ttf') +# clean existing build artifacts +rm -rf target/ +mkdir target/ + +for w in ${weights[@]}; do - makeotf -f $f -gf GlyphOrderAndAliasDB_TT -newNameID4 -r + makeotf -sp target/$family-$w-otf.fpr -f Roman/$w/font.pfa -r -o target/$family-$w.otf + makeotf -sp target/$family-$w-ttf.fpr -f Roman/$w/font.ttf -gf GlyphOrderAndAliasDB_TT -newNameID4 -r -o target/$family-$w.ttf + rm Roman/$w/current.fpr # remove default options file from the source tree after building done