1 ;; DEV2-OTF.flt -- Font Layout Table for dev2 OpenType fonts
2 ;; Copyright (C) 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter dev2-otf nil
7 (font (nil nil unicode-bmp :otf=dev2)))
11 ;;; For dev2 OpenType fonts to draw the Devanagari script.
13 ;; No matter what the Microsoft Typography web page says, modifier
14 ;; character sequences accepted by Uniscribe are the following.
16 ;; 1. matra (pre, below, above, post)
17 ;; 2. one of candrabindu (0901), anusvara (0902), grave (0953), acute (0954)
18 ;; 3. udatta (0951) and/or anudatta (0952)
20 ;; For rendering, on the other hand, the combination of Uniscribe and
21 ;; mangal.ttf (dev2) requires the following orders.
24 ;; 1. above- or post matra
26 ;; 3. one of candrabindu (0901), anusvara (0902), grave (0953), acute (0954)
35 ;; V: independent vowel
40 ;; m: vowel sign (pre)
41 ;; u: vowel sign (above)
42 ;; b: vowel sign (below)
43 ;; p: vowel sign (post)
44 ;; a: vowel modifier / accent (above)
45 ;; A: vowel modifier (post)
46 ;; s: stress sign (above)
47 ;; S: stress sign (below)
50 (0x0900 0x097F ?X) ; generic
51 (0x0900 0x0902 ?a) ; SIGN INVERTED CANDRABINDU .. ANUSVARA
52 (0x0903 ?A) ; SIGN VISARGA
53 (0x0904 0x0914 ?V) ; LETTER SHORT A .. AU
54 (0x0915 0x0939 ?C) ; LETTER KA .. HA
55 (0x0930 ?R) ; LETTER RA
56 (0x093C ?n) ; SIGN NUKTA
57 (0x093E ?p) ; VOWEL SIGN AA
58 (0x093F ?m) ; VOWEL SIGN I
59 (0x0940 ?p) ; VOWEL SIGN II
60 (0x0941 0x0944 ?b) ; VOWEL SIGN UU .. VOCALIC RR
61 (0x0945 0x0948 ?u) ; VOWEL SIGN CANDRA E .. AI
62 (0x0949 0x094C ?p) ; VOWEL SIGN CANDRA O .. AU
63 (0x094D ?H) ; SIGN VIRAMA
64 (0x094E ?m) ; VOWEL SIGN PRISHTHAMATRA E
65 (0x0951 ?s) ; STRESS SIGN UDATTA
66 (0x0952 ?S) ; STRESS SIGN ANUDATTA
67 (0x0953 0x0954 ?a) ; GRAVE ACCENT .. ACUTE ACCENT
68 (0x0955 ?u) ; VOWEL SIGN CHANDRA LONG E
69 (0x0958 0x095F ?C) ; LETTER QA .. YYA
70 (0x0960 0x0961 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
71 (0x0962 0x0963 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL
72 (0x0972 ?V) ; LETTER CANDRA A
73 (0x0979 0x097F ?C) ; LETTER ZHA .. BBA
77 (0x25CC ?X) ; DOTTED CIRCLE
87 ;; Compose a consonant and a nukta
88 ((0x0928 0x093C) 0x0929)
89 ((0x0930 0x093C) 0x0931)
90 ((0x0933 0x093C) 0x0934)
91 ((0x0915 0x093C) 0x0958)
92 ((0x0916 0x093C) 0x0959)
93 ((0x0917 0x093C) 0x095A)
94 ((0x091C 0x093C) 0x095B)
95 ((0x0921 0x093C) 0x095C)
96 ((0x0922 0x093C) 0x095D)
97 ((0x092B 0x093C) 0x095E)
98 ((0x092F 0x093C) 0x095F)
104 ;; Syllable identification
108 ;; Syllables with an independent vowel
109 ("(RH)?Vn?(J?HR)?m?u?b?p?n?a?(Ss?|sS?)?A?"
112 ;; Consonant-based syllables
113 ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?u?b?p?n?)a?(Ss?|sS?)?A?"
116 ;; Combining marks are displayed with a DOTTED CIRCLE.
117 ("(m)|(n|H|u|b|p|a|S|s|A|JHR)"
118 < (1 =) 0x25CC (2 :otf=dev2=blwf+) >)
124 ;; Basic shaping forms and matra reordering
128 ;; Explicit halant form starting with RA + H + ZWJ
129 (" (RHJ[CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
130 | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |)
132 ;; Explicit halant form starting with a reph
133 (" (RH)([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
134 | (1 :otf=dev2=rphf+) (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
137 ;; Other explicit halant forms
138 (" ([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
139 | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |)
141 ;; Ordinary syllables starting with RA + H + ZWJ
143 (" (RHJ[CRnHJ]*)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
145 ;; This is an asterisk. If it were a plus sign, a standalone RHJ
146 ;; would match with the next pattern, not with this one.
147 | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
150 ;; Ordinary syllables starting with a reph
152 (" (RH)([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
153 | (3 = *) (1 :otf=dev2=rphf+)
154 (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
157 ;; Other ordinary syllables
159 (" ([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
160 | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
167 ;; Final reordering #1 (Move pre-base matra after the last halant)
172 (" (mn?)([^ ]+HJ?)([^H ]+) "
173 | (2 = *) (1 = *) (3 = *) |)
179 ;; Final reordering #2 (Move reph after the first halant)
183 ;; Syllables with a reph and an explicit halant
185 (" (mn?)?(r)([^H ]+HJ?)([^ ]*) "
186 | (1 = *) (3 = *) (2 =) (4 = *) |)
188 ;; A reph without explicit halant
190 (" (mn?)?(r)([^aSsA ]+)(a?(Ss?|sS?)?A?) "
191 | (1 = *) (3 = *) (2 =) (4 = *) |)
197 ;; Nukta for matra and presentation forms
202 | (1 :otf=dev2=nukt,pres,abvs,blws,psts,haln,calt+) |)
223 (1 :otf=dev2=+kern,dist,abvm,blwm))
228 ;; Copyright (C) 2010
229 ;; National Institute of Advanced Industrial Science and Technology (AIST)
230 ;; Registration Number H15PRO112
232 ;; This file is part of the m17n database; a sub-part of the m17n
235 ;; The m17n library is free software; you can redistribute it and/or
236 ;; modify it under the terms of the GNU Lesser General Public License
237 ;; as published by the Free Software Foundation; either version 2.1 of
238 ;; the License, or (at your option) any later version.
240 ;; The m17n library is distributed in the hope that it will be useful,
241 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
242 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
243 ;; Lesser General Public License for more details.
245 ;; You should have received a copy of the GNU Lesser General Public
246 ;; License along with the m17n library; if not, write to the Free
247 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
248 ;; Boston, MA 02110-1301, USA.