summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile28
-rw-r--r--tests/tests.txt54
2 files changed, 77 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
diff --git a/tests/tests.txt b/tests/tests.txt
new file mode 100644
index 0000000..6725bd3
--- /dev/null
+++ b/tests/tests.txt
@@ -0,0 +1,54 @@
+10-ാം
+സ്പ്ര സ്പ്രി സ്പ്രേ ക്ത പ്ര
+ഗ്ദ്ധ്രോ ക്ത്ര
+എടാാാാ എടാാാാാാാാ
+6 ാം ക്സ
+ക്സ്ര ന്റ്ര
+
+ാ ി ു
+
+യ്ക യ്ക്ക യ്ത യ്ക്കു യ്ത്ത യ്ത്തു യ്ന യ്നു
+ല്ക ല്ക്ക ല്ക്കു ല്തു ല്ത്തൂ ല്പ ല്പു
+ഷ്ക്ക ഷ്ക്കു ഷ്ഠൂ
+പ്ത പ്തു
+ഖ്ര
+ഴ്വ
+ൎഠ
+ൎപ
+ഭൄ
+ഥ്ര ഥൃ
+പച്ചപ്പയ്യ്
+കല്ല്
+ഉവ്വ്
+കുറ്റ്യാടി
+മുഖ്യമന്ത്രി
+ദ്ഗ ദ്ന ദ്ല ദ്ബ ദ്മ
+
+ബ്ര ശ്ന വ്ശ ശ്ക ശ്ക്ക ശ്ദ ശ്പ ശ്ബ സ്ഗ ഷ സ്ഹ ഹ്ത
+
+സ്പ്ലേ
+അഥൎവ്വം
+ൎത ൎവ
+തീൎത്ഥം
+വൎത്തുളം
+ചൎക്ക
+നിൎഗ്ഗളം
+ചൎച്ച
+ചൎച്ച്
+മാൎച്ച്
+മാൎത്ത
+തീൎത്ഥ്
+പ്പ്ര
+മാൎജ്ജാരന്‍
+അൎജ്ജുനന്‍
+
+ഉൎവ്വശി ഭാൎയ ഭാൎയ്യ
+നിൎലോഭം
+നിൎല്ലോഭം
+വയ്യ
+തൎജ്ജമ
+തൎജമ
+ഉൎവശി
+സൂൎയ്യന്‍
+സൂൎയന്‍
+