1 ;; KNDA-OTF.flt -- Font Layout Table for Kannada OpenType fonts
2 ;; Copyright (C) 2004, 2007, 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter knda-otf nil
7 (font (nil nil unicode-bmp :otf=knda)))
11 ;;; For Kannada OpenType fonts to draw the Kannada script.
14 ;; b: before subscript matras
15 ;; a: after subscript matras
16 (0x0C80 0x0CFF ?X) ; generic
17 (0x0C82 0x0C83 ?A) ; SIGN ANUSVARA .. VISARGA
18 (0x0C85 0x0C94 ?V) ; LETTER A .. LETTER AU
19 (0x0C95 0x0CB9 ?C) ; LETTER KA .. LETTER HA
20 (0x0CB0 ?R) ; LETTER RA
21 (0x0CBC ?n) ; SIGN NUKTA
22 (0x0CBE 0x0CBF ?b) ; VOWEL SIGN AA .. I
23 (0x0CC1 0x0CC2 ?b) ; VOWEL SIGN U .. UU
24 (0x0CC3 0x0CC4 ?a) ; VOWEL SIGN VOCALIC R .. VOCALIC RR
25 (0x0CC6 ?b) ; VOWEL SIGN E
26 (0x0CCC ?b) ; VOWEL SIGN AU
27 (0x0CCD ?H) ; SIGN VIRAMA
28 (0x0CD5 0x0CD6 ?a) ; LENGTH MARK .. AI LENGTH MARK
29 (0x0CDE ?C) ; LETTER FA (LLLA)
30 (0x0CE0 0x0CE1 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
31 (0x0CE2 0x0CE3 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL
35 (0x25CC ?X) ; DOTTED CIRCLE
46 ;; Decompose multi-part vowel signs.
62 ;; Syllable identification
66 ;; Syllables with an independent vowel
67 ("(RH)?(Vn?)((J?H[CR])?b?b?a?A?)"
68 < | (1 = =) (2 :otf=knda=nukt+) (3 = *) | >)
70 ;; Consonant-based syllables
72 ("([CR]n?((J?H|HJ?)[CR]n?)*)(H[NJ]?|b?b?a?n?A?)"
75 (".+HJ$" :otf=knda=nukt,akhn+)
76 ("(.+)(H)N?$" (1 :otf=knda=nukt,akhn+) (2 =) 0x200C)
77 (".+" :otf=knda=nukt,akhn+))
80 ;; Multi-part vowel signs
83 ((font-facility 0x25CC) < 0x25CC = = >)
87 ((font-facility 0x25CC) < 0x25CC = = >)
91 ((font-facility 0x25CC) < 0x25CC = = >)
93 ((0x0CC6 0x0CC2 0x0CD5)
95 ((font-facility 0x25CC) < 0x25CC = = = >)
99 ((font-facility 0x25CC) < 0x25CC = = >)
102 ;; Combining marks are displayed with a DOTTED CIRCLE.
105 ((font-facility 0x25CC) < 0x25CC = >)
108 ;; Isolated blwf is displayed with a DOTTED CIRCLE in the
111 < | (1 =) (3 =) (2 =) | >)
117 ;; Reorder halant for blwf
124 ((font-facility 0x25CC) < 0x25CC (1 :otf=knda=blwf+) >)
125 (" J([CR]H) " [ (1 :otf=knda=blwf+) ])))
127 ;; Syllables with an overt halant
128 (" (RHJ?)?([^ ]+)(HN) "
129 | (1 = *) (2 reorder *) (3 = =) |)
131 ;; Ordinary syllables
132 (" (RHJ?)?([^baA ]+)(b?b?n?a?n?A?) "
133 | (1 = *) (2 reorder *) (3 = *) |)
140 ("J?(H)([CR])" (2 =) (1 =))
146 ;; Although all consonants have a blow form and none has a half form,
147 ;; we have to prevent the first consonant from forming the below form.
151 ;; Overt halant forms
152 (" (RHJ?)?([^ ]+)(HN) "
155 ("RH" :otf=knda=rphf+)))
156 (2 (cond ("(.H)J?(.*)" (1 :otf=knda=half+) (2 lang-forms *))
157 (".+" lang-forms *)))
161 (" (RHJ?)?([^baA ]*)(b?b?n?a?n?A?) "
164 ("RH" :otf=knda=rphf+)))
165 (2 (cond ("(.H)J?(.*)" (1 :otf=knda=half+) (2 lang-forms *))
166 (".+" lang-forms *)))
174 ("(.H)J" (1 :otf=knda=half+))
175 (".H" :otf=knda=blwf,half+)
180 ;; Final reordering #1 (Move before-subscript matras)
184 (" ([^B ]*[^BJ])J?(B*)(bb?n?)([^ ]*) "
185 | (1 = *) (3 = *) (2 = *) (4 = *) |)
191 ;; Final reordering #2 (Move reph after the first halant)
195 ;; Syllables with a reph and an explicit halant
197 (" (r)([^H ]+HJ?)([^ ]*) "
198 | (2 = *) (1 =) (3 = *) |)
200 ;; A reph without explicit halant
203 | (2 = *) (1 =) (3 =) |)
209 ;; Nukta for matra and presentation forms
214 | (1 :otf=knda=nukt,pres,abvs,blws,psts,haln+) |)
235 (1 :otf=knda=+abvm,blwm,dist))
240 ;; Copyright (C) 2004, 2007, 2010
241 ;; National Institute of Advanced Industrial Science and Technology (AIST)
242 ;; Registration Number H15PRO112
244 ;; This file is part of the m17n database; a sub-part of the m17n
247 ;; The m17n library is free software; you can redistribute it and/or
248 ;; modify it under the terms of the GNU Lesser General Public License
249 ;; as published by the Free Software Foundation; either version 2.1 of
250 ;; the License, or (at your option) any later version.
252 ;; The m17n library is distributed in the hope that it will be useful,
253 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
254 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
255 ;; Lesser General Public License for more details.
257 ;; You should have received a copy of the GNU Lesser General Public
258 ;; License along with the m17n library; if not, write to the Free
259 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
260 ;; Boston, MA 02110-1301, USA.