-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefonts
executable file
·108 lines (97 loc) · 6.91 KB
/
makefonts
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/env bash
if command -v vexmoji >/dev/null 2>&1; then
VEXMOJI="vexmoji"
elif command -v vexillo >/dev/null 2>&1; then
VEXMOJI="vexillo emoji"
elif test -f vexillo.jar; then
VEXMOJI="java -jar vexillo.jar emoji"
else
echo "Please run make install or add vexillo.jar to this directory."
exit 1
fi
rm -rf fonts
mkdir fonts
AMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 0"
BMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 2000"
CMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 1800"
DMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 1600"
EMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 1500"
FMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 1200"
HMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 2400"
KMETRICS="-ma 900 -md 300 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1100 -gw 1600"
VMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 1920"
WMETRICS="-ma 1000 -md 200 -la 1200 -ld 400 -lb 100 -rb 100 -gb -100 -gh 1200 -gw 2134"
VFMETRICS="-ma 640 -md 160 -la 800 -ld 250 -sw 800 -lb 0 -rb 0 -gb -60 -gh 800 -gw 800"
VNMETRICS="-ma 1900 -md 500 -la 2224 -ld 594 -sw 2994 -lb 0 -rb 0 -gb -594 -gh 2818 -gw 2994"
VBMETRICS="-ma 1556 -md 492 -la 1901 -ld 483 -sw 651 -lb 0 -rb 0 -gb -400 -gh 2048 -gw 2048"
$VEXMOJI --cbdt -n 'Kreative Vexillo GA' $AMETRICS -bh 84 -bw 0 -bg 7 -o fonts/VexilloGA.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo MA' $AMETRICS -bh 84 -bw 0 -bg 0 -o fonts/VexilloMA.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo GA' $AMETRICS -bh 120 -bw 0 -bg 10 -o fonts/VexilloGA.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo MA' $AMETRICS -bh 120 -bw 0 -bg 0 -o fonts/VexilloMA.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GB' $BMETRICS -bh 120 -bw 200 -bg 10 -o fonts/VexilloGB.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MB' $BMETRICS -bh 120 -bw 200 -bg 0 -o fonts/VexilloMB.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GC' $CMETRICS -bh 120 -bw 180 -bg 10 -o fonts/VexilloGC.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MC' $CMETRICS -bh 120 -bw 180 -bg 0 -o fonts/VexilloMC.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GD' $DMETRICS -bh 120 -bw 160 -bg 10 -o fonts/VexilloGD.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MD' $DMETRICS -bh 120 -bw 160 -bg 0 -o fonts/VexilloMD.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GE' $EMETRICS -bh 120 -bw 150 -bg 10 -o fonts/VexilloGE.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo ME' $EMETRICS -bh 120 -bw 150 -bg 0 -o fonts/VexilloME.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GF' $FMETRICS -bh 120 -bw 120 -bg 10 -o fonts/VexilloGF.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MF' $FMETRICS -bh 120 -bw 120 -bg 0 -o fonts/VexilloMF.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo GH' $HMETRICS -bh 96 -bw 192 -bg 8 -o fonts/VexilloGH.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo MH' $HMETRICS -bh 96 -bw 192 -bg 0 -o fonts/VexilloMH.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo GH' $HMETRICS -bh 120 -bw 240 -bg 10 -o fonts/VexilloGH.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo MH' $HMETRICS -bh 120 -bw 240 -bg 0 -o fonts/VexilloMH.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo GK' $KMETRICS -bh 110 -bw 160 -bg 10 -o fonts/VexilloGK.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo MK' $KMETRICS -bh 110 -bw 160 -bg 0 -o fonts/VexilloMK.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo GK' $KMETRICS -bh 132 -bw 192 -bg 12 -o fonts/VexilloGK.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo MK' $KMETRICS -bh 132 -bw 192 -bg 0 -o fonts/VexilloMK.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GV' $VMETRICS -bh 120 -bw 192 -bg 10 -o fonts/VexilloGV.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MV' $VMETRICS -bh 120 -bw 192 -bg 0 -o fonts/VexilloMV.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo GW' $WMETRICS -bh 120 -bw 214 -bg 10 -o fonts/VexilloGW.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo MW' $WMETRICS -bh 120 -bw 214 -bg 0 -o fonts/VexilloMW.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo VF' $VFMETRICS -bh 120 -bw 120 -bg 0 -by fruit -o fonts/VexilloVF.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo VF' $VFMETRICS -bh 160 -bw 160 -bg 0 -by fruit -o fonts/VexilloVF.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI -n 'Kreative Vexillo VN' $VNMETRICS -bh 128 -bw 136 -bg 0 -by number -o fonts/VexilloVN.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --cbdt -n 'Kreative Vexillo VB' $VBMETRICS -bh 120 -bw 120 -bg 0 -by bird -o fonts/VexilloVB.sfd -e encoding.txt flags/*.kvxx
$VEXMOJI --nocbdt -n 'Kreative Vexillo VB' $VBMETRICS -bh 160 -bw 160 -bg 0 -by bird -o fonts/VexilloVB.sfd -e encoding.txt flags/*.kvxx
if command -v fontforge >/dev/null 2>&1; then
FONTFORGE="fontforge"
elif test -f /Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge; then
FONTFORGE="/Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge"
else
echo "Could not find FontForge. SFD files must be compiled to TTF manually."
exit 0
fi
$FONTFORGE -lang=ff -c 'i = 1; while (i < $argc); Open($argv[i]); Generate($argv[i]:r + ".ttf", "", 128); i = i+1; endloop' fonts/Vexillo??.sfd
if command -v bitsnpicas >/dev/null 2>&1; then
BITSNPICAS="bitsnpicas"
elif test -f BitsNPicas.jar; then
BITSNPICAS="java -jar BitsNPicas.jar"
elif test -f ../BitsNPicas/BitsNPicas.jar; then
BITSNPICAS="java -jar ../BitsNPicas/BitsNPicas.jar"
elif test -f ../../BitsNPicas/BitsNPicas.jar; then
BITSNPICAS="java -jar ../../BitsNPicas/BitsNPicas.jar"
elif test -f ../../../BitsNPicas/BitsNPicas.jar; then
BITSNPICAS="java -jar ../../../BitsNPicas/BitsNPicas.jar"
elif test -f ../../../../BitsNPicas/BitsNPicas.jar; then
BITSNPICAS="java -jar ../../../../BitsNPicas/BitsNPicas.jar"
else
echo "Could not find BitsNPicas. Images must be injected into TTF manually."
exit 0
fi
$BITSNPICAS injectsbix fonts/Vexillo??.ttf
$BITSNPICAS injectsvg fonts/Vexillo??.ttf
$BITSNPICAS injectcbdt fonts/Vexillo??.ttf
rm -rf tmp
mkdir tmp
cd tmp
mkdir Apple
mkdir Mozilla+Adobe
mkdir Google
cp ../fonts/*.ttf.sbix.ttf Apple
cp ../fonts/*.ttf.svg.ttf Mozilla+Adobe
cp ../fonts/*.ttf.cbdt.ttf Google
zip -r ../fonts/vexillo-fonts.zip Apple Mozilla+Adobe Google
cd ..
rm -rf tmp