summaryrefslogtreecommitdiff
path: root/Makefile
blob: 96c5a8838b6ca00c6ca1bed3e1523fd732e4eec9 (plain)
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
all: sans slab mono

sans:
	echo "BASEDIR=\"$(CURDIR)\"" > /tmp/makefonts.flw
	cat "scripts/build.py" >> /tmp/makefonts.flw
	open -nWa "$(FONTLAB)" /tmp/makefonts.flw

v2:
	echo "BASEDIR=\"$(CURDIR)\"" > /tmp/makefontsB.flw
	cat "scripts/build-v2.py" >> /tmp/makefontsB.flw
	open -nWa "$(FONTLAB)" /tmp/makefontsB.flw


slab:
	echo "BASEDIR=\"$(CURDIR)\"" > /tmp/makefonts.flw
	cat "scripts/build-slab.py" >> /tmp/makefonts.flw
	open -nWa "$(FONTLAB)" /tmp/makefonts.flw

slabitalic:
	echo "BASEDIR=\"$(CURDIR)\"" > /tmp/makefonts.flw
	cat "scripts/build-slabitalic.py" >> /tmp/makefonts.flw
	open -nWa "$(FONTLAB)" /tmp/makefonts.flw

mono:
	echo "BASEDIR=\"$(CURDIR)\"" > /tmp/makefonts.flw
	cat "scripts/build-monoV2.py" >> /tmp/makefonts.flw
	open -nWa "$(FONTLAB)" /tmp/makefonts.flw

crunch:
	mkdir -p out/crunched
	cd third_party/fontcrunch && \
	for source in ../../out/RobotoTTF/*.ttf ../../out/RobotoCondensedTTF/*.ttf; do \
		python fontcrunch.py gen $$source; \
	done && \
	$(MAKE) -j24 && \
	for source in ../../out/RobotoTTF/*.ttf ../../out/RobotoCondensedTTF/*.ttf; do \
		python fontcrunch.py pack $$source ../../out/crunched/$$(basename $$source) >/dev/null; \
        done

android:
	mkdir -p out/android
	for source in out/RobotoTTF/*.ttf out/RobotoCondensedTTF/*.ttf; do \
	        touched=$$(mktemp); \
	        subsetted=$$(mktemp); \
		final=out/android/$$(basename $$source); \
		python scripts/touchup_for_android.py $$source $$touched && \
		python $$HOME/noto/nototools/subset.py $$touched $$subsetted && \
		python scripts/force_yminmax.py $$subsetted $$final && \
		rm $$touched $$subsetted; \
	done

glass: out/android/Roboto-Thin.ttf
	mkdir -p out/glass
	python scripts/touchup_for_glass.py $< out/glass/Roboto-Thin.ttf

test: test-android

test-android:
	python scripts/run_android_tests.py