Commit b56d36d6 authored by Santhosh Thottingal's avatar Santhosh Thottingal
Browse files

Rewrite Rachana OT lookups outside SFD

* This fixes several bugs on Rachana and Rachana bold
* Added onum variants to Rachana bold
* Added rh_half and dotreph to Rachana bold
* From Rachana, removed glyhs like 'sple' which was added as workaround for bugs
* Rachana and Rachana bold use same lookups now. Removed the lookups from Rachana
  and Rachana Bold SFD
parent 4f9d9a3e
......@@ -2,14 +2,16 @@
fonts=Rachana Rachana-Bold
default: compile
all: compile webfonts
@for font in `echo ${fonts}`;do \
echo "Generating $${font}.ttf";\
fontforge -lang=ff -c "Open('$${font}.sfd'); Generate('$${font}.ttf')";\
echo "Generating $$font.ttf";\
$(PY) $(buildscript) $$font.sfd $(feature);\
......@@ -24,3 +26,10 @@ install: compile
@for font in `echo ${fonts}`;do \
install -D -m 0644 $${font}.ttf ${DESTDIR}/${fontpath}/$${font}.ttf;\
test: compile
# Test the fonts
@for font in `echo ${fonts}`; do \
echo "Testing font $${font}";\
hb-view $${font}.ttf --text-file tests/tests.txt --output-file tests/$${font}.pdf;\
This diff is collapsed.
This diff is collapsed.
languagesystem DFLT dflt;
languagesystem latn dflt;
languagesystem mlm2 dflt;
languagesystem mlym dflt;
include (tables.fea)
include (lookups.fea)
# -------------------
# -------------------
feature pref {
script mlm2;
language dflt ;
lookup pref_reph;
} pref;
# Akhand Ligatures
# ----------------
feature akhn {
script mlm2;
language dflt ;
lookup akhn_chillu;
lookup akhn_conjuncts;
lookup akhn_conditional_stacking;
script mlym;
language dflt ;
lookup akhn_chillu;
lookup akhn_conjuncts;
lookup akhn_conditional_stacking;
} akhn;
feature blwf {
script mlm2;
language dflt ;
lookup blwf_la_sign;
script mlym;
language dflt ;
lookup blwf_la_sign_mlym;
} blwf;
feature half {
script mlym;
language dflt ;
lookup half_forms_mlym;
} half;
feature pstf {
script mlm2;
language dflt ;
lookup pstf_cons_signs;
script mlym;
language dflt ;
lookup pstf_cons_signs_mlym;
} pstf;
feature pres {
script mlm2;
language dflt ;
lookup pres_reph;
script mlym;
language dflt ;
lookup pres_reph_mlym;
} pres;
feature blws {
script mlm2;
language dflt ;
lookup blws_la_signs;
lookup blws_la_sign_excludes;
script mlym;
language dflt ;
lookup blws_la_signs;
lookup blws_la_sign_excludes;
} blws;
feature psts {
script mlm2;
language dflt ;
lookup psts_vowel_signs;
script mlym;
language dflt ;
lookup psts_vowel_signs;
} psts;
feature haln {
script mlym;
language dflt ;
lookup haln_chillu;
} haln;
feature abvm {
script DFLT;
language dflt ;
lookup abvm_dotreph;
script mlm2;
language dflt ;
lookup abvm_dotreph;
} abvm;
feature onum {
script DFLT;
language dflt ;
lookup onum_oldnumbers;
script latn;
language dflt ;
lookup onum_oldnumbers;
script mlm2;
language dflt ;
lookup onum_oldnumbers;
script mlym;
language dflt ;
lookup onum_oldnumbers;
} onum;
This diff is collapsed.
#Mark attachment classes (defined in GDEF, used in lookupflags)
@GDEF_Simple = [.notdef .null nonmarkingreturn CR space exclam quotedbl
numbersign dollar percent ampersand quotesingle parenleft parenright
asterisk plus comma hyphen period slash zero one two three four five
six seven eight nine colon semicolon less equal greater question at A B
C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash
bracketright asciicircum underscore grave a b c d e f g h i j k l m n o
p q r s t u v w x y z braceleft bar braceright asciitilde anusvara
visarga ml_a ml_aa ml_i ml_ii ml_u ml_uu ml_r ml_l ml_e ml_ee ml_ai
ml_o ml_oo ml_au k1 k2 k3 k4 ng ch1 ch2 ch3 ch4 nj t1 t2 t3 t4 nh th1
th2 th3 th4 n1 p1 p2 p3 p4 m1 y1 r3 rh l3 lh zh v1 z1 sh s1 h1 avagraha
a2 i1 i2 u1 u2 r1 e1 e2 ai1 o1 o2 au1 au2 ml_rr ml_ll ml_0 ml_1 ml_2
ml_3 ml_4 ml_5 ml_6 ml_7 ml_8 ml_9 ZWNJ ZWJ uni25CC NULL rupee datemark
ml_1000 l2 l1 n2 r2 ml_100 ml_10 ml_quarter ml_half ml_3quarter rh_half
singlequoteleft singlequoteright doublequoteleft doublequoteright
endash emdash bullet zero.old one.old two.old three.old four.old
five.old six.old seven.old eight.old nine.old dagger section ];
@GDEF_Ligature = [r4 y2 y2u1 y2u2 v2 nhcil n1cil r3cil l3cil lhcil k1cil
k1u1 k1u2 k1r1 k1r2 k1l1 k1k1 k1k1u1 k1k1u2 k1k1r1 k1k1r3 k1k1r3u1
k1k1r3u2 k1t1 k1t1u1 k1t1u2 k1t1r3 k1t1r3u1 k1t1r3u2 k1nh k1nhu1 k1nhu2
k1th1 k1th1u1 k1th1u2 k1th1r1 k1th1r2 k1th1r3 k1th1r3u1 k1th1r3u2 k1n1
k1n1u1 k1n1u2 k1m1 k1m1u1 k1m1u2 k1r3 k1r3u1 k1r3u2 k1l3 k1l3u1 k1l3u2
k1sh k1shu1 k1shu2 k1shr1 k1shnh k1shnhu1 k1shnhu2 k1shm1 k1shm1u1
k1shm1u2 k1shm1r1 k1s1 k1s1u1 k1s1u2 k1s1r1 k1rhrh k1rhrhu1 k1rhrhu2
k2u1 k2u2 k2r1 k3u1 k3u2 k3r1 k3r2 k3k3 k3k3u1 k3k3u2 k3k3r1 k3k4
k3k4u1 k3k4u2 k3k4r1 k3th3 k3th3u1 k3th3u2 k3th3r1 k3th3th4 k3th3th4u1
k3th3th4u2 k3th3th4r1 k3th3th4r3 k3th3th4r3u1 k3th3th4r3u2 k3n1 k3n1u1
k3n1u2 k3m1 k3m1u1 k3m1u2 k3r3 k3r3u1 k3r3u2 k3l3 k3l3u1 k3l3u2 k4u1
k4u2 k4r1 k4r2 k4n1 k4n1u1 k4n1u2 k4r3 k4r3u1 k4r3u2 ngu1 ngu2 ngk1
ngk1u1 ngk1u2 ngk1r1 ngng ngngu1 ngngu2 ch1u1 ch1u2 ch1ch1 ch1ch1u1
ch1ch1u2 ch1ch2 ch1ch2u1 ch1ch2u2 ch1ch2r1 ch1ch2r3 ch1ch2r3u1
ch1ch2r3u2 ch2u1 ch2u2 ch2r1 ch2r3 ch2r3u1 ch2r3u2 ch3u1 ch3u2 ch3r1
ch3r2 ch3ch3 ch3ch3u1 ch3ch3u2 ch3ch3r1 ch3nj ch3nju1 ch3nju2 ch3r3
ch3r3u1 ch3r3u2 ch4u1 ch4u2 ch4r1 ch4r2 ch4r3 ch4r3u1 ch4r3u2 nju1 nju2
njch1 njch1u1 njch1u2 njch1r1 njch2 njch2u1 njch2u2 njch2r1 njch3
njch3u1 njch3u2 njnj njnju1 njnju2 t1u1 t1u2 t1r1 t1r2 t1t1 t1t1u1
t1t1u2 t1r3 t1r3u1 t1r3u2 t2u1 t2u2 t3u1 t3u2 t3r1 t3t3 t3t3u1 t3t3u2
t3t4 t3t4u1 t3t4u2 t3m1 t3m1u1 t3m1u2 t3m1r1 t3r3 t3r3u1 t3r3u2 t4u1
t4u2 t4r1 t4r3 t4r3u1 t4r3u2 nhu1 nhu2 nht1 nht1u1 nht1u2 nht1r3
nht1r3u1 nht1r3u2 nht2 nht3 nht3u1 nht3u2 nht3r1 nht3r3 nht3r3u1
nht3r3u2 nht4 nht4u1 nht4u2 nht4r1 nhnh nhnhu1 nhnhu2 nhm1 nhm1u1
nhm1u2 th1u1 th1u2 th1r1 th1r2 th1th1 th1th1u1 th1th1u2 th1th1r1
th1th1r2 th1th1r3 th1th1r3u1 th1th1r3u2 th1th2 th1th2u1 th1th2u2
th1th2r1 th1n1 th1p4 th1p4u1 th1p4u2 th1p4r1 th1m1 th1m1u1 th1m1u2
th1m1r1 th1r3 th1r3u1 th1r3u2 th1l3 th1l3u1 th1l3u2 th1s1 th1s1u1
th1s1u2 th1s1r1 th1s1r2 th1s1th2 th1s1th2u1 th1s1th2u2 th1s1th2r1
th1s1n1 th1s1n1u1 th1s1n1u2 th1s1m1 th1s1m1u1 th1s1m1u2 th1s1m1r1
th1s1r3 th1s1r3u1 th1s1r3u2 th2u1 th2u2 th2n1 th2n1u1 th2n1u2 th2m1
th2m1u1 th2m1u2 th2m1r1 th3u1 th3u2 th3r1 th3r2 th3th3 th3th3u1
th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m1
h1m1u1 h1m1u2 h1m1r1 h1r3 h1r3u1 h1r3u2 h1l3 h1l3u1 h1l3u2 lhu1 lhu2
lhlh lhlhu1 lhlhu2 zhu1 zhu2 zhk1 zhk1u1 zhk1u2 zhk1k1 zhk1k1u1
zhk1k1u2 zhch1 zhch1u1 zhch1u2 zhth1 zhth1u1 zhth1u2 zhth1th1
zhth1th1u1 zhth1th1u2 zhn1 zhn1u1 zhn1u2 zhn1n1 zhn1n1u1 zhn1n1u2 zhp1
zhp1u1 zhp1u2 zhm1 zhm1u1 zhm1u2 zhv1 zhv1u1 zhv1u2 zhs1 zhs1u1 zhs1u2
rhu1 rhu2 rhrh rhrhu1 rhrhu2 l4 k1xx k2xx k3xx k4xx ngxx ch1xx ch2xx
ch3xx ch4xx njxx t1xx t2xx t3xx t4xx nhxx th1xx th2xx th3xx th4xx n1xx
p1xx p2xx p3xx p4xx m1xx y1xx r3xx rhxx l3xx lhxx zhxx v1xx z1xx shxx
s1xx h1xx ];
@GDEF_Mark = [xx dotreph ];
table GDEF {
# 1. Bases: single character, spacing glyphs.
# 2. Ligatures: multiple character, spacing glyphs.
# 3. Marks: non-spacing combining glyphs.
# 4. Components: part of single character, spacing glyphs.
GlyphClassDef @GDEF_Simple, @GDEF_Ligature, @GDEF_Mark, ;
This diff is collapsed.
import sys
import time
import fontforge
font =[1])
# Remove all GSUB lookups
for lookup in font.gsub_lookups:
# Remove all GPOS lookups
for lookup in font.gpos_lookups:
# Merge the new featurefile
font.version = time.strftime('%Y%m%d')
font.generate(sys.argv[1].replace(".sfd",".ttf"), flags=("omit-instructions", "round", "opentype"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment