-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.sh
72 lines (60 loc) · 2.29 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
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
set -e
mkdir -p fonts
#Make unhinted
mkdir -p fonts/unhinted
UNHINTED_VF_PATH=fonts/unhinted/Roboto[ital,wdth,wght].ttf
fontmake -m sources/Roboto.designspace -o variable --output-path $UNHINTED_VF_PATH
python scripts/drop_mvar.py $UNHINTED_VF_PATH
python scripts/gen_stat.py $UNHINTED_VF_PATH
python scripts/instantiate_statics.py $UNHINTED_VF_PATH fonts/unhinted/static
# Make Android
mkdir -p fonts/android
ANDROID_VF_PATH=fonts/android/Roboto[ital,wdth,wght].ttf
subset.py $UNHINTED_VF_PATH $ANDROID_VF_PATH
python scripts/touchup_for_android.py $ANDROID_VF_PATH
python scripts/instantiate_statics.py $ANDROID_VF_PATH fonts/android/static
for font in $(ls fonts/android/static/*.ttf)
do
python scripts/touchup_for_android.py $font;
done
# Make hinted
mkdir -p fonts/hinted
HINTED_VF_PATH=fonts/hinted/Roboto[ital,wdth,wght].ttf
# Transfer Hints and compile them
cp $UNHINTED_VF_PATH $HINTED_VF_PATH
python -m vttLib mergefile sources/vtt-hinting.ttx $HINTED_VF_PATH
python -m vttLib compile $HINTED_VF_PATH $HINTED_VF_PATH.fix --ship
mv $HINTED_VF_PATH.fix $HINTED_VF_PATH
python scripts/touchup_for_web.py $HINTED_VF_PATH
python scripts/instantiate_statics.py $HINTED_VF_PATH fonts/hinted/static
for font in $(ls fonts/web/hinted/*.ttf)
do
python scripts/touchup_for_web.py $font;
done
# Make web
mkdir -p fonts/web
WEB_VF_PATH=fonts/web/Roboto[ital,wdth,wght].ttf
python scripts/subset_for_web.py $HINTED_VF_PATH $WEB_VF_PATH
python scripts/touchup_for_web.py $WEB_VF_PATH
# Split fonts can be removed once all browsers support slnt and ital axes properly
mkdir -p fonts/web/split
python scripts/split_slnt_vf.py $WEB_VF_PATH fonts/web/split
python scripts/instantiate_statics.py $WEB_VF_PATH fonts/web/static
python scripts/instantiate_condensed.py \
fonts/web/split/Roboto[wdth,wght].ttf \
fonts/web/split/Roboto-Italic[wdth,wght].ttf \
fonts/web/condensed
for font in $(ls fonts/web/static/*.ttf)
do
python scripts/touchup_for_web.py $font;
done
# Make ChromeOS
mkdir -p fonts/chromeos
CHROMEOS_VF_PATH=fonts/chromeos/Roboto[ital,wdth,wght].ttf
subset.py $HINTED_VF_PATH $CHROMEOS_VF_PATH
python scripts/touchup_for_cros.py $CHROMEOS_VF_PATH
python scripts/instantiate_statics.py $CHROMEOS_VF_PATH fonts/chromeos/static
for font in $(ls fonts/chromeos/static/*.ttf)
do
python scripts/touchup_for_cros.py $font;
done