1 ;; GUJR-OTF.flt -- Font Layout Table for Gujarati OpenType fonts
2 ;; Copyright (C) 2004, 2007, 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter gujr-otf nil
7 (font (nil nil unicode-bmp :otf=gujr)))
11 ;;; For Gujarati OpenType fonts to draw the Gujarati script.
15 ;; V: independent vowel
20 ;; m: vowel sign (pre)
21 ;; u: vowel sign (above)
22 ;; b: vowel sign (below)
23 ;; p: vowel sign (post)
24 ;; a: vowel modifier (above)
25 ;; A: vowel modifier (post)
28 (0x0A80 0x0AFF ?X) ; generic
29 (0x0A81 0x0A82 ?a) ; SIGN CANDRABINDU .. ANUSVARA
30 (0x0A83 ?A) ; SIGN VISARGA
31 (0x0A85 0x0A94 ?V) ; LETTER A .. AU
32 (0x0A95 0x0AB9 ?C) ; LETTER KA .. HA
33 (0x0AB0 ?R) ; LETTER RA
34 (0x0ABC ?n) ; SIGN NUKTA
35 (0x0ABE ?p) ; VOWEL SIGN AA
36 (0x0ABF ?m) ; VOWEL SIGN I
37 (0x0AC0 ?p) ; VOWEL SIGN II
38 (0x0AC1 0x0AC4 ?b) ; VOWEL SIGN UU .. VOCALIC RR
39 (0x0AC5 0x0AC8 ?u) ; VOWEL SIGN CANDRA E .. AI
40 (0x0AC9 0x0ACC ?p) ; VOWEL SIGN CANDRA O .. AU
41 (0x0ACD ?H) ; SIGN VIRAMA
42 (0x0AE0 0x0AE1 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
43 (0x0AE2 0x0AE3 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL
47 (0x25CC ?X) ; DOTTED CIRCLE
53 ;; Syllable identification
57 ;; Syllables with an independent vowel
58 ("(RH)?(Vn?)((J?HR)?m?u?b?p?n?a?A?)"
59 < | (1 = =) (2 :otf=gujr=nukt+) (3 = *) | >)
61 ;; Consonant-based syllables
63 ("([CR]n?((J?H|HJ?)[CR]n?)*)(H[NJ]?|m?u?b?p?n?a?A?)"
66 (".+HJ$" :otf=gujr=nukt,akhn+)
67 ("(.+)(H)N?$" (1 :otf=gujr=nukt,akhn+) (2 =) 0x200C)
68 (".+" :otf=gujr=nukt,akhn+))
71 ;; Combining marks are displayed with a DOTTED CIRCLE.
74 ((font-facility 0x25CC) < = 0x25CC >)
78 ((font-facility 0x25CC) < 0x25CC = >)
81 ;; Isolated blwf is displayed with a DOTTED CIRCLE in the next stage.
83 < | (1 =) (3 =) (2 =) | >)
89 ;; Reorder halant for blwf
96 ((font-facility 0x25CC) < 0x25CC :otf=gujr=blwf+ >)
97 (" J(RH) " [ (1 :otf=gujr=blwf+) ])))
99 ;; Syllables with an overt halant
100 (" (RHJ?)?([^ ]+)(HN) "
101 | (1 = *) (2 reorder) (3 = =) |)
103 ;; Ordinary syllables
104 (" (RHJ?)?([^mubpaA ]+)(m?u?b?p?n?a?A?) "
105 | (1 = *) (2 reorder) (3 = *) |)
110 ;; In Devanagari and Gujarati, vattu has a half form. Thus we handle
111 ;; the sequence CHRHC as (CH)half + (RH)blwf + C instead of
112 ;; reordering and interpreting it as C + (RH)blwf + H + C.
115 ("(.+)(H)(R)$" (1 = *) (3 =) (2 =))
120 ;; Language forms and matra reordering
124 ;; Overt halant forms
125 (" (RHJ?)?([^ ]+)(HN) "
127 (1 (cond ("RHJ" :otf=gujr=half+)
128 ("RH" :otf=gujr=rphf+)))
129 (2 (cond ("(.H)(.+)" (1 :otf=gujr=half+) (2 :otf=gujr=blwf,half+))
130 (".+" :otf=gujr=blwf,half+)))
135 (" (RHJ?)?([^mubpaA ]*)(mn?)?(un?)?(bn?)?(p?n?a?A?) "
137 (1 (cond ("RHJ" :otf=gujr=half+)
138 ("RH" :otf=gujr=rphf+)))
139 (2 (cond ("(.H)(.+)" (1 :otf=gujr=half+) (2 :otf=gujr=blwf,half+))
140 (".+" :otf=gujr=blwf,half+)))
141 (5 = *) (4 = *) (6 = *) |)
147 ;; Final reordering #1 (Move pre-base matra after the last halant)
152 (" (mn?)([^ ]+HJ?)([^H ]+) "
153 | (2 = *) (1 = *) (3 = *) |)
159 ;; Final reordering #2 (Move reph after the first halant)
163 ;; Syllables with a reph and an explicit halant
165 (" (mn?)?(r)([^H ]+HJ?)([^ ]*) "
166 | (1 = *) (3 = *) (2 =) (4 = *) |)
168 ;; A reph without explicit halant
170 (" (mn?)?(r)([^aA ]+)(a?A?) "
171 | (1 = *) (3 = *) (2 =) (4 = *) |)
177 ;; Nukta for matra, vattu and presentation forms
182 | (1 :otf=gujr=nukt,vatu,pres,abvs,blws,psts,haln+) |)
203 (1 :otf=gujr=+abvm,blwm,dist))
208 ;; Copyright (C) 2004, 2007, 2010
209 ;; National Institute of Advanced Industrial Science and Technology (AIST)
210 ;; Registration Number H15PRO112
212 ;; This file is part of the m17n database; a sub-part of the m17n
215 ;; The m17n library is free software; you can redistribute it and/or
216 ;; modify it under the terms of the GNU Lesser General Public License
217 ;; as published by the Free Software Foundation; either version 2.1 of
218 ;; the License, or (at your option) any later version.
220 ;; The m17n library is distributed in the hope that it will be useful,
221 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
222 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
223 ;; Lesser General Public License for more details.
225 ;; You should have received a copy of the GNU Lesser General Public
226 ;; License along with the m17n library; if not, write to the Free
227 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
228 ;; Boston, MA 02110-1301, USA.