summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajeesh K Nambiar <rajeeshknambiar@gmail.com>2014-11-25 19:33:29 +0100
committerRajeesh K Nambiar <rajeeshknambiar@gmail.com>2014-11-25 19:33:29 +0100
commit44f63b309c95ad42b17ed241123671d4ac37882a (patch)
treef0bae2163fc9478ceff184681d597d687b1e2d71
parent9fb49880f8fba0c343a41ae396389e8b3b3369c8 (diff)
downloadMeera.git-44f63b309c95ad42b17ed241123671d4ac37882a.tar.gz
Meera.git-44f63b309c95ad42b17ed241123671d4ac37882a.tar.xz
Meera.git-44f63b309c95ad42b17ed241123671d4ac37882a.zip
Add Makefile to build ttf/woff/eot and test
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..20b680e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+fontpath=/usr/share/fonts/truetype/malayalam
+font=Meera
+
+default: all
+all: compile test webfonts
+
+compile:
+ @echo "Generating ${font}.ttf"
+ @fontforge -lang=ff -c "Open('${font}.sfd'); Generate('${font}.ttf')";
+
+webfonts:compile
+ @echo "Generating webfonts";
+ @sfntly -w ${font}.ttf ${font}.woff;
+ @sfntly -e -x ${font}.ttf ${font}.eot;
+ @[ -x `which woff2_compress` ] && woff2_compress ${font}.ttf;
+
+test: compile
+# Test the fonts
+ @echo "Testing font ${font}";
+ @hb-view ${font}.ttf --text-file tests/tests.txt --output-file tests/${font}.pdf;