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)
63 ((0x0D23 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
64 ((0x0D28 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
65 ((0x0D30 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
66 ((0x0D32 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
67 ((0x0D33 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
68 ((0x0D15 0x0D4D 0x200D) :otf=mlym=akhn,half,haln+)
74 ;; Syllable identification
78 ;; Consonant-based syllables
80 ("([CBPR]((J?H|HJ?)[CBPR])*)(H[NJ]?|m?p?A?)"
81 < | (1 :otf=mlym=akhn+)
83 ("(H)N?" (1 =) 0x200C)
86 ;; Syllables with an independent vowel
90 ;; Two-part vowel signs
93 ((font-facility 0x25CC) < = 0x25CC = >)
97 ((font-facility 0x25CC) < = 0x25CC = >)
101 ((font-facility 0x25CC) < = 0x25CC = >)
104 ;; Combining marks are displayed with a DOTTED CIRCLE.
107 ((font-facility 0x25CC) < = 0x25CC >)
111 ((font-facility 0x25CC) < 0x25CC = >)
114 ;; Isolated blwf and pstf are displayed with a DOTTED CIRCLE in the
117 < | (1 =) (3 =) (2 =) | >)
123 ;; Reorder halant for blwf and pstf
127 ;; Isolated blwf and pstf
130 ((font-facility 0x25CC) < 0x25CC (1 :otf=mlym=blwf,pstf+) >)
131 (" J([BP]H) " [ (1 :otf=mlym=blwf,pstf+) ])))
136 ((font-facility 0x25CC) < (1 :otf=mlym=pstf+) 0x25CC >)
137 (" J(RH) " [ (1 :otf=mlym=pstf+) ])))
141 | (1 reorder) (2 = =) |)
143 ;; Ordinary syllables
144 (" ([^mbpA ]+)(m?p?A?) "
145 | (1 reorder) (2 = *) |)
153 ("(.|.+([^PJ]|JP))((J?HP)*J?HR)$"
154 (1 reorder-B *) (3 reorder-any *))
155 ;; pref between blwf and pstf
156 ("(.*[^J])(J?HR(J?HP)+)$"
157 (1 reorder-B *) (2 reorder-any *))
159 ("(.*[^J])(J?HR(J?HB)+(J?HP)*)$"
160 (1 reorder-B *) (2 reorder-any *))
162 ("(.|.+([^PJ]|JP|HJ))((J?HP)*)$"
163 (1 reorder-B *) (3 reorder-any *))
178 ;; Language forms and matra reordering
182 ;; Overt halant forms
184 | (1 blwf-pstf) (2 = =) |)
188 (" ([^mpA ]+)(m)?(p?A?) "
189 | (2 =) (1 blwf-pstf) (3 = *) |)
197 ("(.|.+BH|.+[^H])((PH)*)(RH)$"
198 (4 :otf=mlym=pstf) (1 :otf=mlym=blwf+) (2 :otf=mlym=pstf+))
201 (2 :otf=mlym=pstf+) (1 :otf=mlym=blwf+) (3 :otf=mlym=pstf+))
203 ("(.*)(RH)((BH)+)((PH)*)$"
204 (2 :otf=mlym=pstf+) (1 :otf=mlym=blwf+) (3 :otf=mlym=blwf+)
207 ("(.|.+BH|.+[^H])((PH)*)$"
208 (1 :otf=mlym=blwf+) (2 :otf=mlym=pstf+))))
212 ;; Final reordering (Move pre-base matra and pref after the last halant)
216 ;; With a pref, one or more intermediate- and a final overt halant forms.
218 (" (r)([^ ]+HJ?)([^H ]+HN) "
219 | (2 = *) (1 =) (3 = *) |)
221 ;; With a pref and a final overt halant form. Don't move the pref.
226 (" (m?r?)([^ ]+HJ?)([^H ]+) "
227 | (2 = *) (1 = *) (3 = *) |)
248 (1 :otf=mlym=+abvm,blwm,dist))
253 ;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
254 ;; National Institute of Advanced Industrial Science and Technology (AIST)
255 ;; Registration Number H15PRO112
257 ;; This file is part of the m17n database; a sub-part of the m17n
260 ;; The m17n library is free software; you can redistribute it and/or
261 ;; modify it under the terms of the GNU Lesser General Public License
262 ;; as published by the Free Software Foundation; either version 2.1 of
263 ;; the License, or (at your option) any later version.
265 ;; The m17n library is distributed in the hope that it will be useful,
266 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
267 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
268 ;; Lesser General Public License for more details.
270 ;; You should have received a copy of the GNU Lesser General Public
271 ;; License along with the m17n library; if not, write to the Free
272 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
273 ;; Boston, MA 02110-1301, USA.