-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sh
executable file
·37 lines (28 loc) · 905 Bytes
/
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
#!/bin/sh
set -e
# Download source
mkdir -p fonts
wget -nc -P fonts https://github.com/ButTaiwan/genyo-font/releases/download/v1.501/GenYoMin.zip
unzip -n fonts/GenYoMin.zip "*.ttc" -d fonts
# Generate fonts
font_version=1.007
mkdir -p output
for input_file in fonts/*.ttc; do
output_file=$(echo $input_file | sed -e 's#fonts/GenYoMin-\(.*\).ttc#output/FanWunMing-\1.ttf#g')
output_file_twp=$(echo $input_file | sed -e 's#fonts/GenYoMin-\(.*\).ttc#output/FanWunMing-TW-\1.ttf#g')
# no-twp
python -m OpenCCFontGenerator \
-i $input_file \
-o $output_file \
-n config/name.json \
--ttc-index=0 \
--font-version=$font_version
# twp
python -m OpenCCFontGenerator \
-i $input_file \
-o $output_file_twp \
-n config/name-twp.json \
--ttc-index=0 \
--font-version=$font_version \
--twp
done