forked from googlefonts/NunitoSans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·39 lines (35 loc) · 1.17 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
TTFDIR=./fonts/ttf
# VFDIR=./fonts/vf
mkdir -p $TTFDIR
# mkdir -p $VFDIR
rm -r $TTFDIR/*.ttf
# rm -r $VFDIR/*.ttf
# Build static instances
fontmake -g "./sources/NunitoSans [opsz,slnt,wdth,wght,xhgt].glyphs" -o ttf -i --output-dir $TTFDIR -a
# fontmake -g "./Sources/Petrona-ITALIC-MASTER.glyphs" -o ttf -i --output-dir $TTFDIR -a
for f in $TTFDIR/*.ttf
do
echo Processing $f
gftools fix-dsig --autofix $f
gftools fix-hinting $f
mv $f.fix $f
done
# set -e
# # Build variable font
# VF_FILENAME="$VFDIR/Petrona[wght].ttf"
# fontmake -g "./Sources/Petrona-ROMAN-MASTER.glyphs" -o variable --output-path $VF_FILENAME
# gftools fix-dsig --autofix $VF_FILENAME
# ttfautohint $VF_FILENAME $VF_FILENAME.fix
# mv $VF_FILENAME.fix $VF_FILENAME
# gftools fix-hinting $VF_FILENAME
# mv $VF_FILENAME.fix $VF_FILENAME
# VF_FILENAME="$VFDIR/Petrona-Italic[wght].ttf"
# fontmake -g "./Sources/Petrona-ITALIC-MASTER.glyphs" -o variable --output-path $VF_FILENAME
# gftools fix-dsig --autofix $VF_FILENAME
# ttfautohint $VF_FILENAME $VF_FILENAME.fix
# mv $VF_FILENAME.fix $VF_FILENAME
# gftools fix-hinting $VF_FILENAME
# mv $VF_FILENAME.fix $VF_FILENAME
# Clean up
rm -r instance_ufo
rm -r master_ufo