summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile28
1 files changed, 23 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 3285396..02bc36d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
fontpath=/usr/share/fonts/truetype/malayalam
fonts="AnjaliOldLipi Dyuthi Kalyani Meera Rachana RaghuMalayalamSans Suruma"
-
-default:
+default: clean compile
+all: clean compile test webfonts
+compile:
# generate ttf files from sfd files
@for font in `echo ${fonts}`; \
do \
@@ -13,9 +14,9 @@ install: */*.ttf
do \
install -D -m 0644 $${font}/$${font}.ttf ${DESTDIR}/${fontpath}/$${font}.ttf; done
# copy fontconfig configuration files to system fontconfig configuration directory
- install -D -m 0644 malayalam-fonts.conf ${DESTDIR}/etc/fonts/conf.avail/67-malayalam-fonts.conf
- if ! [ -d ${DESTDIR}/etc/fonts/conf.d ]; then mkdir ${DESTDIR}/etc/fonts/conf.d; fi
- ln -s ../conf.avail/67-malayalam-fonts.conf ${DESTDIR}/etc/fonts/conf.d/67-malayalam-fonts.conf
+ install -D -m 0644 malayalam-fonts.conf ${DESTDIR}/etc/fonts/conf.avail/67-malayalam-fonts.conf
+ if ! [ -d ${DESTDIR}/etc/fonts/conf.d ]; then mkdir ${DESTDIR}/etc/fonts/conf.d; fi
+ ln -sf ../conf.avail/67-malayalam-fonts.conf ${DESTDIR}/etc/fonts/conf.d/67-malayalam-fonts.conf
uninstall:
# remove fonts from system font directories
@@ -38,5 +39,22 @@ clean:
do \
if [ -f $${font}/$${font}.ttf ]; then rm -f $${font}/$${font}.ttf; fi \
done
+ @rm -rf tests/*.pdf webfonts;
+test: compile
+# Test the fonts
+ @for font in `echo ${fonts}`; \
+ do \
+ echo "Testing font $${font}";\
+ hb-view $${font}/$${font}.ttf --debug --text-file tests/tests.txt --output-file tests/$${font}.pdf; \
+ done
+webfonts: compile
+# generate webfonts
+ @for font in `echo ${fonts}`; \
+ do \
+ mkdir -p webfonts/$${font}; \
+ sfntly -w $${font}/$${font}.ttf webfonts/$${font}/$${font}.woff; \
+ sfntly -e -x $${font}/$${font}.ttf webfonts/$${font}/$${font}.eot; \
+ echo "Webfonts generated for $${font}"; \
+ done