-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
51 lines (45 loc) · 1.23 KB
/
Makefile
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
fontpath=/usr/share/fonts/truetype/fonts-kalapi
fonts="Kalapi"
all: clean compile webfonts test
compile:
# generate ttf files from sfd files
@for font in `echo ${fonts}`; \
do \
./generate.pe $${font}.sfd; \
echo "Compiled the font $${font}";\
done
install: compile
# copy ttf files to system font directory
@for font in `echo ${fonts}`; \
do \
echo "Installing the font $${font}";\
install -D -m 0644 $${font}.ttf ${DESTDIR}/${fontpath}/$${font}.ttf; \
done
uninstall:
# remove fonts from system font directories
@for font in `echo ${fonts}`; \
do \
if [ -f ${DESTDIR}/${fontpath}/$${font}.ttf ]; then rm -f ${DESTDIR}/${fontpath}/$${font}.ttf; fi \
echo "Uninstalled the font $${font}";\
done
clean:
# remove ttf fonts
@for font in `echo ${fonts}`; \
do \
if [ -f $${font}.ttf ]; then rm -f $${font}.ttf; fi \
done
test: compile
# Test the fonts
@for font in `echo ${fonts}`; \
do \
echo "Testing font $${font}";\
hb-view $${font}.ttf --debug --text-file ${fonts}.txt --output-file ${fonts}.pdf; \
done
webfonts: compile
# generate webfonts
@for font in `echo ${fonts}`; \
do \
sfntly -w $${font}.ttf $${font}.woff; \
sfntly -e -x $${font}.ttf $${font}.eot; \
echo "Webfonts generated for $${font}"; \
done