1 ;; MLYM-OTF.flt -- Font Layout Table for Malayalam OpenType fonts
2 ;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter mlym-otf nil
7 (font (nil nil unicode-bmp :otf=mlym)))
11 ;;; For Malayalam OpenType fonts to draw the reformed Malayalam script.
13 ;; AnjaliOldLipi.ttf, Dyuthi3.ttf, Meera_04.ttf, Rachana_04.ttf, suruma2.ttf
15 ;; pstf: 0d2f 0d30 0d35
17 ;; RaghuMalayalamSans2.ttf
19 ;; pstf: 0d2f 0d30 0d35 0d41
23 ;; pstf: 0d2f 0d30 0d31 0d35 0d41
27 ;; pstf: 0d2f 0d30 0d32 0d35 0d41
30 (0x0D00 0x0D7F ?X) ; generic
31 (0x0D02 0x0D03 ?A) ; SIGN ANUSVARA .. VISARGA
32 (0x0D05 0x0D14 ?V) ; LETTER A .. AU
33 (0x0D15 0x0D39 ?C) ; LETTER KA .. HA
34 (0x0D2F ?P) ; LETTER YA
35 (0x0D30 ?R) ; LETTER RA
36 (0x0D32 ?B) ; LETTER LA
37 (0x0D35 ?P) ; LETTER VA
38 (0x0D3E 0x0D44 ?p) ; VOWEL SIGN AA .. VOCALIC RR
39 (0x0D46 0x0D48 ?m) ; VOWEL SIGN E .. AI
40 (0x0D4D ?H) ; SIGN VIRAMA
41 (0x0D57 ?p) ; AU LENGTH MARK
42 (0x0D60 0x0D61 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
43 (0x0D62 0x0D63 ?b) ; VOWEL SIGN VOCALIC L .. LL
47 (0x25CC ?X) ; DOTTED CIRCLE
57 ;; Decompose two-part vowel signs
58 ((0x0D4A) 0x0D46 0x0D3E)
59 ((0x0D4B) 0x0D47 0x0D3E)
60 ((0x0D4C) 0x0D46 0x0D57)
66 ;; Syllable identification
70 ;; Consonant-based syllables
72 ("([CBPR]((J?H|HJ?)[CBPR])*)(H[NJ]?|m?p?A?)"
75 (".+HJ$" :otf=mlym=nukt,akhn+)
76 ("(.+)(H)N?$" (1 :otf=mlym=nukt,akhn+) (2 =) 0x200C)
77 (".+" :otf=mlym=nukt,akhn+))
80 ;; Syllables with an independent vowel
84 ;; Two-part vowel signs
87 ((font-facility 0x25CC) < = 0x25CC = >)
91 ((font-facility 0x25CC) < = 0x25CC = >)
95 ((font-facility 0x25CC) < = 0x25CC = >)
98 ;; Combining marks are displayed with a DOTTED CIRCLE.
101 ((font-facility 0x25CC) < = 0x25CC >)
105 ((font-facility 0x25CC) < 0x25CC = >)
108 ;; Isolated blwf and pstf are displayed with a DOTTED CIRCLE in the
111 < | (1 =) (3 =) (2 =) | >)
117 ;; Reorder halant for blwf and pstf
121 ;; Isolated blwf and pstf
124 ((font-facility 0x25CC) < 0x25CC (1 :otf=mlym=blwf,pstf+) >)
125 (" J([BP]H) " [ (1 :otf=mlym=blwf,pstf+) ])))
130 ((font-facility 0x25CC) < (1 :otf=mlym=pstf+) 0x25CC >)
131 (" J(RH) " [ (1 :otf=mlym=pstf+) ])))
135 | (1 reorder) (2 = =) |)
137 ;; Ordinary syllables
138 (" ([^mbpA ]+)(m?p?A?) "
139 | (1 reorder) (2 = *) |)
147 ("(.|.+([^PJ]|JP))((J?HP)*J?HR)$"
148 (1 reorder-B *) (3 reorder-any *))
149 ;; pref between blwf and pstf
150 ("(.*[^J])(J?HR(J?HP)+)$"
151 (1 reorder-B *) (2 reorder-any *))
153 ("(.*[^J])(J?HR(J?HB)+(J?HP)*)$"
154 (1 reorder-B *) (2 reorder-any *))
156 ("(.|.+([^PJ]|JP|HJ))((J?HP)*)$"
157 (1 reorder-B *) (3 reorder-any *))))
171 ;; Language forms and matra reordering
175 ;; Overt halant forms
177 | (1 blwf-pstf) (2 = =) |)
181 (" ([^mpA ]+)(m)?(p?A?) "
182 | (2 =) (1 blwf-pstf) (3 = *) |)
190 ("(.|.+BH|.+[^H])((PH)*)(RH)$"
191 (4 :otf=mlym=pstf) (1 :otf=mlym=blwf+) (2 :otf=mlym=pstf+))
194 (2 :otf=mlym=pstf+) (1 :otf=mlym=blwf+) (3 :otf=mlym=pstf+))
196 ("(.*)(RH)((BH)+)((PH)*)$"
197 (2 :otf=mlym=pstf+) (1 :otf=mlym=blwf+) (3 :otf=mlym=blwf+)
200 ("(.|.+BH|.+[^H])((PH)*)$"
201 (1 :otf=mlym=blwf+) (2 :otf=mlym=pstf+))))
205 ;; Final reordering (Move pre-base matra and pref after the last halant)
209 ;; With a pref, one or more intermediate- and a final overt halant forms.
211 (" (r)([^ ]+HJ?)([^H ]+HN) "
212 | (2 = *) (1 =) (3 = *) |)
214 ;; With a pref and a final overt halant form. Don't move the pref.
219 (" (m?r?)([^ ]+HJ?)([^H ]+) "
220 | (2 = *) (1 = *) (3 = *) |)
241 (1 :otf=mlym=+abvm,blwm,dist))
246 ;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
247 ;; National Institute of Advanced Industrial Science and Technology (AIST)
248 ;; Registration Number H15PRO112
250 ;; This file is part of the m17n database; a sub-part of the m17n
253 ;; The m17n library is free software; you can redistribute it and/or
254 ;; modify it under the terms of the GNU Lesser General Public License
255 ;; as published by the Free Software Foundation; either version 2.1 of
256 ;; the License, or (at your option) any later version.
258 ;; The m17n library is distributed in the hope that it will be useful,
259 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
260 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
261 ;; Lesser General Public License for more details.
263 ;; You should have received a copy of the GNU Lesser General Public
264 ;; License along with the m17n library; if not, write to the Free
265 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
266 ;; Boston, MA 02110-1301, USA.