Browse files

When building the fonts using included build script, create artifacts…

… outside of the main source tree.
  • Loading branch information...
1 parent 7443559 commit dabf359b48bc31113aaa0f624db3a17eb0785e2f @ppicazo committed Sep 25, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8
@@ -1,13 +1,15 @@
-# Build OTFs
-for f in $(find . -name 'font.pfa')
- makeotf -f $f -r
+weights=('Black' 'Bold' 'ExtraLight' 'Light' 'Regular' 'Semibold')
+# clean existing build artifacts
+rm -rf target/
+mkdir target/
-# Build TTFs
-for f in $(find . -name 'font.ttf')
+for w in ${weights[@]};
- 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

miguelsousa Sep 25, 2012

I've just noticed the '-newNameID4' option. It isn't needed in this case.
Some of our internal projects require it because the OTFs have to be built with one setting (stored in the fontinfo file) while the TTFs are build with another (which then must be provided in the build command).

+ rm Roman/$w/current.fpr # remove default options file from the source tree after building

1 comment on commit dabf359

We should check that this solution (with minor changes) works for Source Sans as well. Keep in mind that SS has italics, so the list of weights and the path to the font sources will be different.

Please sign in to comment.