summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2013-08-18 12:36:06 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2013-08-18 12:36:06 +0530
commit6c0d8da8be9c81958740eb601a5673427d6363c3 (patch)
treeb392ff96ba68d7ce46be6ae4ec77e2825f877350
parent3b7656a07ab2f57d9774ecebfdbb34f846e697a9 (diff)
downloadAnjaliOldLipi.git-6c0d8da8be9c81958740eb601a5673427d6363c3.zip
AnjaliOldLipi.git-6c0d8da8be9c81958740eb601a5673427d6363c3.tar.gz
AnjaliOldLipi.git-6c0d8da8be9c81958740eb601a5673427d6363c3.tar.xz
Updated Makefile with test and webfonts support
-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