-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkfont
executable file
·41 lines (41 loc) · 867 Bytes
/
mkfont
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
40
41
#!/bin/bash
if [ -z "$1" ]; then
exit
fi
FontBaseName=$1
fontforge -script gen.script $FontBaseName.sfd
if [ $? -ne 0 ]; then
echo "fontforge error"
exit
fi
sfntedit -d kern $FontBaseName.otf
if [ $? -ne 0 ]; then
echo "sfntedit error"
exit
fi
tx -t1 -e -1 -f $FontBaseName.otf > $FontBaseName.pfa
if [ $? -ne 0 ]; then
echo "tx error"
exit
fi
h="-hinted"
autohint -q -log po.log -o $FontBaseName$h.pfa $FontBaseName.pfa
if [ $? -ne 0 ]; then
echo "autohint error"
exit
fi
n=NameDB
if [ -n "$2" ]; then
NameFile=$2$n
else
NameFile=$FontBaseName$n
fi
g=GlyphDB
FeatureFile=$FontBaseName.fea
GlyphFile=$FontBaseName$g
makeotf -fi fontinfo -f $FontBaseName$h.pfa -o $FontBaseName.otf\
-ff $FeatureFile -mf $NameFile -gf $GlyphFile -ga
if [ $? -ne 0 ]; then
echo "makeotf error"
fi
rm $FontBaseName.pfa $FontBaseName$h.pfa