From 8a0e25f07fee29f4f3ff55956fef0704a8e878cc Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Tue, 25 Nov 2014 19:32:26 +0100 Subject: Add Makefile to build ttf/woff/eot and test --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..383f676 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +fontpath=/usr/share/fonts/truetype/malayalam +font=Dyuthi + +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; -- cgit