Skip to content

Commit dabf359

Browse files
committed
When building the fonts using included build script, create artifacts outside of the main source tree.
1 parent 7443559 commit dabf359

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

build.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/sh
22

3-
# Build OTFs
4-
for f in $(find . -name 'font.pfa')
5-
do
6-
makeotf -f $f -r
7-
done
3+
family=SourceCodePro
4+
weights=('Black' 'Bold' 'ExtraLight' 'Light' 'Regular' 'Semibold')
5+
6+
# clean existing build artifacts
7+
rm -rf target/
8+
mkdir target/
89

9-
# Build TTFs
10-
for f in $(find . -name 'font.ttf')
10+
for w in ${weights[@]};
1111
do
12-
makeotf -f $f -gf GlyphOrderAndAliasDB_TT -newNameID4 -r
12+
makeotf -sp target/$family-$w-otf.fpr -f Roman/$w/font.pfa -r -o target/$family-$w.otf
13+
makeotf -sp target/$family-$w-ttf.fpr -f Roman/$w/font.ttf -gf GlyphOrderAndAliasDB_TT -newNameID4 -r -o target/$family-$w.ttf
14+
rm Roman/$w/current.fpr # remove default options file from the source tree after building
1315
done

0 commit comments

Comments
 (0)