-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·38 lines (30 loc) · 1.08 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
#!/bin/bash
FONTFORGE=/home/osboxes/Workspace/fontforge/build/bin/fontforge
if test -z $DEBUG; then DEBUG='INFO'; fi
if test -e $FONTFORGE; then
true
else
FONTFORGE=`which fontforge`
fi
$FONTFORGE -lang=py -script build.py
for f in *FontForge.ufo; do
rm -r ${f/-FontForge/} || true
cp -r "$f" ${f/-FontForge/}
(cat ${f/-FontForge/}/features.fea; cat features.fea) > ${f/-FontForge/}/features.fea.tmp
mv ${f/-FontForge/}/features.fea.tmp ${f/-FontForge/}/features.fea
done
fontmake --verbose $DEBUG -m NotoSansTagalog.designspace -o variable --keep-overlaps --optimize-cff 0 --no-optimize-gvar --keep-direction --output-path NotoSansTagalog[wght].ttf
rm dist/*
mv 'NotoSansTagalog[wght].ttf' 'dist/NotoSansTagalog[wght].ttf'
fontmake --verbose $DEBUG -m NotoSansTagalog.designspace -o ttf -i --keep-overlaps --optimize-cff 0 --keep-direction
mv instance_ttf/*.ttf dist
rmdir instance_ttf
for f in dist/*.ttf; do
gftools fix-dsig --autofix "$f"
done
cd dist
for f in *-*.ttf; do
ttfautohint -s "$f" "$f-hinted"
mv "$f-hinted" "$f"
echo "Autohinted $f"
done