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 two-part and three-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 ;; Combining marks are displayed with a DOTTED CIRCLE.
94 ("n|H|bb?a?|a|A|JH[CR]"
95 < 0x25CC (0 :otf=knd2=blwf+) >)
101 ;; Basic shaping forms
105 ;; Syllables starting with RA + H + ZWJ
106 (" (RHJ[CRnHJ]*)((H[NJ]?|b?b?a?n?)A?) "
108 ;; This is an asterisk. (See DEV2-OTF.flt)
109 | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |)
111 ;; Syllables starting with a reph
112 (" (RH)([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) "
113 | (1 :otf=knd2=rphf+) (2 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (3 = *) |)
116 (" ([CRnHJV]+)((H[NJ]?|b?b?n?a?n?)A?) "
117 | (1 :otf=knd2=locl,nukt,akhn,blwf,cjct+) (2 = *) |)
123 ;; Final reordering #1 (Move before-subscript matras)
127 (" ([^B ]*[^BJ])J?(B*)(bb?n?)([^ ]*) "
128 | (1 = *) (3 = *) (2 = *) (4 = *) |)
134 ;; Final reordering #2 (Move reph after the first halant)
138 ;; Syllables with a reph and an explicit halant
140 (" (r)([^H ]+HJ?)([^ ]*) "
141 | (2 = *) (1 =) (3 = *) |)
143 ;; A reph without explicit halant
146 | (2 = *) (1 =) (3 =) |)
152 ;; Nukta for matra and presentation forms
157 | (1 :otf=knd2=nukt,pres,abvs,blws,psts,haln,calt+) |)
178 (1 :otf=knd2=+kern,dist,abvm,blwm))
183 ;; Copyright (C) 2010
184 ;; National Institute of Advanced Industrial Science and Technology (AIST)
185 ;; Registration Number H15PRO112
187 ;; This file is part of the m17n database; a sub-part of the m17n
190 ;; The m17n library is free software; you can redistribute it and/or
191 ;; modify it under the terms of the GNU Lesser General Public License
192 ;; as published by the Free Software Foundation; either version 2.1 of
193 ;; the License, or (at your option) any later version.
195 ;; The m17n library is distributed in the hope that it will be useful,
196 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
197 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
198 ;; Lesser General Public License for more details.
200 ;; You should have received a copy of the GNU Lesser General Public
201 ;; License along with the m17n library; if not, write to the Free
202 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
203 ;; Boston, MA 02110-1301, USA.