1 ;; KND2-OTF.flt -- Font Layout Table for knd2 OpenType fonts
2 ;; Copyright (C) 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter knd2-otf nil
7 (font (nil nil unicode-bmp :otf=knd2)))
11 ;;; For knd2 OpenType fonts to draw the Kannada script.
13 ;; It seems that tunga.ttf has problems w.r.t. reph and ZWJ. For
14 ;; example, Uniscribe does not render RA + HAL + ZWJ + KA (0CB0 + 0CCD
15 ;; + 200D + 0C95) as described in the page
16 ;; <http://www.microsoft.com/typography/otfntdev/kanadot/shaping.aspx>.
17 ;; Perhaps the font still uses the old specification that was defined
20 ;; Glyphs are reordered in the following way to layout the Kannada script.
22 ;; 2. matra set #1 (0CBE, 0CBF, 0CC1, 0CC6, 0CCC)
23 ;; 3. vowel sign UU (0CC2)
25 ;; 5. matra set #2 (0CC3, 0CC4, 0CD5, 0CD6)
27 ;; 7. anusvara (0C82) and visarga (0C83)
29 ;; 0CE2 and 0CE3, which should be included in "matra set #1" above,
30 ;; are not yet implemented.
33 ;; b: before subscript matras
34 ;; a: after subscript matras
35 (0x0C80 0x0CFF ?X) ; generic
36 (0x0C82 0x0C83 ?A) ; SIGN ANUSVARA .. VISARGA
37 (0x0C85 0x0C94 ?V) ; LETTER A .. LETTER AU
38 (0x0C95 0x0CB9 ?C) ; LETTER KA .. LETTER HA
39 (0x0CB0 ?R) ; LETTER RA
40 (0x0CBC ?n) ; SIGN NUKTA
41 (0x0CBE 0x0CBF ?b) ; VOWEL SIGN AA .. I
42 (0x0CC1 0x0CC2 ?b) ; VOWEL SIGN U .. UU
43 (0x0CC3 0x0CC4 ?a) ; VOWEL SIGN VOCALIC R .. VOCALIC RR
44 (0x0CC6 ?b) ; VOWEL SIGN E
45 (0x0CCC ?b) ; VOWEL SIGN AU
46 (0x0CCD ?H) ; SIGN VIRAMA
47 (0x0CD5 0x0CD6 ?a) ; LENGTH MARK .. AI LENGTH MARK
48 (0x0CDE ?C) ; LETTER FA (LLLA)
49 (0x0CE0 0x0CE1 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
50 (0x0CE2 0x0CE3 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL
54 (0x25CC ?X) ; DOTTED CIRCLE
65 ;; Decompose multi-part vowel signs.
81 ;; Syllable identification
85 ;; Syllables with an independent vowel
86 ("(RH)?Vn?(J?H[CR])?b?b?a?A?"
89 ;; Consonant-based syllables
90 ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|b?b?a?n?)A?"
93 ;; Multi-part vowel signs
96 ((font-facility 0x25CC) < 0x25CC 0x0CBF 0x0CD5 >)
100 ((font-facility 0x25CC) < 0x25CC 0x0CC6 0x0CD5 >)
104 ((font-facility 0x25CC) < 0x25CC 0x0CC6 0x0CD6 >)
106 ((0x0CC6 0x0CC2 0x0CD5)
108 ((font-facility 0x25CC) < 0x25CC 0x0CC6 0x0CC2 0x0CD5 >)
112 ((font-facility 0x25CC) < 0x25CC 0x0CC6 0x0CC2 >)
115 ;; Combining marks are displayed with a DOTTED CIRCLE.
118 ((font-facility 0x25CC) < 0x25CC = >)
122 ((font-facility 0x25CC) < 0x25CC :otf=knd2=blwf+ >)
123 (".+" [ :otf=knd2=blwf+ ])))
129 ;; Basic shaping forms
133 ;; Syllables starting with RA + H + ZWJ
134 (" (RHJ[CRnHJ]*)((H[NJ]?|b?b?a?n?)A?) "
136 ;; This is an asterisk. (See DEV2-OTF.flt)
137 | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |)
139 ;; Syllables starting with a reph
140 (" (RH)([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) "
141 | (1 :otf=knd2=rphf+) (2 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (3 = *) |)
144 (" ([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) "
145 | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |)
151 ;; Final reordering #1 (Move before-subscript matras)
155 (" ([^B ]*[^BJ])J?(B*)(bb?n?)([^ ]*) "
156 | (1 = *) (3 = *) (2 = *) (4 = *) |)
162 ;; Final reordering #2 (Move reph after the first halant)
166 ;; Syllables with a reph and an explicit halant
168 (" (r)([^H ]+HJ?)([^ ]*) "
169 | (2 = *) (1 =) (3 = *) |)
171 ;; A reph without explicit halant
174 | (2 = *) (1 =) (3 =) |)
180 ;; Nukta for matra and presentation forms
185 | (1 :otf=knd2=nukt,pres,abvs,blws,psts,haln,calt+) |)
206 (1 :otf=knd2=+kern,dist,abvm,blwm))
211 ;; Copyright (C) 2010
212 ;; National Institute of Advanced Industrial Science and Technology (AIST)
213 ;; Registration Number H15PRO112
215 ;; This file is part of the m17n database; a sub-part of the m17n
218 ;; The m17n library is free software; you can redistribute it and/or
219 ;; modify it under the terms of the GNU Lesser General Public License
220 ;; as published by the Free Software Foundation; either version 2.1 of
221 ;; the License, or (at your option) any later version.
223 ;; The m17n library is distributed in the hope that it will be useful,
224 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
225 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
226 ;; Lesser General Public License for more details.
228 ;; You should have received a copy of the GNU Lesser General Public
229 ;; License along with the m17n library; if not, write to the Free
230 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
231 ;; Boston, MA 02110-1301, USA.