1 ;; KNDA-OTF.flt -- Font Layout Table for Kannada OpenType fonts
2 ;; Copyright (C) 2004, 2007 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter knda-otf nil
6 (font (nil nil unicode-bmp :otf=knda=rphf)))
10 ;;; For Kannada OpenType fonts to draw the Kannada script.
13 ;; C: consonant (except for RA)
17 ;; u: vowel sign (above)
18 ;; b: vowel sign (below)
19 ;; p: vowel sign (post)
21 ;; a: vowel modifier (post)
22 ;; V: independent vowel
23 ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
24 ;; J: ZWJ (ZERO WIDTH JOINER)
26 (0x0C80 0x0CFF ?X) ; generic
27 (0x0C82 0x0C83 ?a) ; SIGN ANUSVARA .. VISARGA
28 (0x0C85 0x0C94 ?V) ; LETTER A .. LETTER AU
29 (0x0C95 0x0CB9 ?C) ; LETTER KA .. LETTER HA
30 (0x0CB0 ?R) ; LETTER RA
31 (0x0CBC ?n) ; SIGN NUKTA
32 (0x0CBE ?p) ; VOWEL SIGN AA
33 (0x0CBF ?u) ; VOWEL SIGN I
34 (0x0CC1 0x0CC4 ?p) ; VOWEL SIGN U .. RR
35 (0x0CC6 ?u) ; VOWEL SIGN E
36 (0x0CCC ?u) ; VOWEL SIGN AU
37 (0x0CCD ?H) ; SIGN VIRAMA
38 (0x0CD5 0x0CD6 ?l) ; LENGTH MARK .. AI LENGTH MARK
39 (0x0CDE ?C) ; LETTER FA (LLLA)
40 (0x0CE0 0x0CE1 ?V) ; LETTER VOCALIC RR .. LL
41 (0x0CE2 0x0CE3 ?b) ; VOWEL SIGN VOCALIC L .. LL
42 (0x0964 0x0965 ?X) ; DANDA .. DOUBLE DANDA
51 ;; Decompose two-part and three-part vowel signs.
62 ;; Move ZWJ between RA and HARANT.
68 ;; Syllable identification.
69 ;; Apply 'nukt' and 'akhn' before reordering.
74 ;; A syllable with an above vowel sign.
76 ("(J)?([CR]n?(H[CR]n?)*)(up?l?a?)"
77 < | (1 =) (2 otf:knda=nukt,akhn+) (4 = *) | >)
79 ;; A syllable with a post- or below vowel sign.
81 ("(J)?([CR]n?(H[CR]n?)*)(p|b)(a)?"
82 < | (1 =) (2 otf:knda=nukt,akhn+) (4 =) (5 =) | >)
84 ;; A syllable with a vowel modifier, but without vowel signs.
86 ("(J)?([CR]n?(H[CR]n?)*)(a)"
87 < | (1 =) (2 otf:knda=nukt,akhn+) (4 =) | >)
89 ;; No vowel signs, no vowel modifiers.
91 ("(J)?([CR]n?(H[CR]n?)*)(HN?)?"
92 < | (1 =) (2 otf:knda=nukt,akhn+) (4 = *) | >)
94 ;; A syllable starting with an independent vowel.
101 ;; Reordering. The base consonant is always the first one, because
102 ;; all Kannada consonants have a below form.
107 (" (RH)?([^N])((H[^N])*)(u|b)?(p)?(l)?(a)? "
108 | (2 =) (5 =) (6 =) (3 move-h) (7 =) (1 otf:knda=rphf+) (8 =) |)
110 ;; A syllable ending with a halant.
112 (" (RH)?(.H)((.H)*)N? "
113 ;; WORKAROUND : Kedage fonts produce halant form with 'psts'.
114 | (2 otf:knda=haln,psts+)(3 = *) (1 otf:knda=rphf+) |)
116 ;; No reph movement if preceded by a ZWJ.
118 (" J(.)((H[^N])*)(u|b)?(p)?(l?a?) "
119 | (1 =) (4 =) (5 =) (2 move-h) (6 = *) |)
123 | (1 otf:knda=haln,psts+) (2 = *) |)
133 ;; Apply other OTF features.
138 (1 otf:knda=blwf,abvs,blws,psts+abvm,blwm,dist))
144 ;; Copyright (C) 2004, 2007
145 ;; National Institute of Advanced Industrial Science and Technology (AIST)
146 ;; Registration Number H15PRO112
148 ;; This file is part of the m17n database; a sub-part of the m17n
151 ;; The m17n library is free software; you can redistribute it and/or
152 ;; modify it under the terms of the GNU Lesser General Public License
153 ;; as published by the Free Software Foundation; either version 2.1 of
154 ;; the License, or (at your option) any later version.
156 ;; The m17n library is distributed in the hope that it will be useful,
157 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
158 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
159 ;; Lesser General Public License for more details.
161 ;; You should have received a copy of the GNU Lesser General Public
162 ;; License along with the m17n library; if not, write to the Free
163 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
164 ;; Boston, MA 02110-1301, USA.