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)
21 ;; For rendering, on the other hand, the combination of Uniscribe and
22 ;; mangal.ttf (dev2) requires the following orders.
25 ;; 1. above- or post matra
27 ;; 3. one of candrabindu (0901), anusvara (0902), grave (0953), acute (0954)
36 ;; V: independent vowel
41 ;; m: vowel sign (pre)
42 ;; u: vowel sign (above)
43 ;; b: vowel sign (below)
44 ;; p: vowel sign (post)
45 ;; a: vowel modifier / accent (above)
46 ;; A: vowel modifier (post)
47 ;; s: stress sign (above)
48 ;; S: stress sign (below)
51 (0x0900 0x097F ?X) ; generic
52 (0x0900 0x0902 ?a) ; SIGN INVERTED CANDRABINDU .. ANUSVARA
53 (0x0903 ?A) ; SIGN VISARGA
54 (0x0904 0x0914 ?V) ; LETTER SHORT A .. AU
55 (0x0915 0x0939 ?C) ; LETTER KA .. HA
56 (0x0930 ?R) ; LETTER RA
57 (0x093C ?n) ; SIGN NUKTA
58 (0x093E ?p) ; VOWEL SIGN AA
59 (0x093F ?m) ; VOWEL SIGN I
60 (0x0940 ?p) ; VOWEL SIGN II
61 (0x0941 0x0944 ?b) ; VOWEL SIGN UU .. VOCALIC RR
62 (0x0945 0x0948 ?u) ; VOWEL SIGN CANDRA E .. AI
63 (0x0949 0x094C ?p) ; VOWEL SIGN CANDRA O .. AU
64 (0x094D ?H) ; SIGN VIRAMA
65 (0x094E ?m) ; VOWEL SIGN PRISHTHAMATRA E
66 (0x0951 ?s) ; STRESS SIGN UDATTA
67 (0x0952 ?S) ; STRESS SIGN ANUDATTA
68 (0x0953 0x0954 ?a) ; GRAVE ACCENT .. ACUTE ACCENT
69 (0x0955 ?u) ; VOWEL SIGN CHANDRA LONG E
70 (0x0958 0x095F ?C) ; LETTER QA .. YYA
71 (0x0960 0x0961 ?V) ; LETTER VOCALIC RR .. VOCALIC LL
72 (0x0962 0x0963 ?b) ; VOWEL SIGN VOCALIC L .. VOCALIC LL
73 (0x0972 ?V) ; LETTER CANDRA A
74 (0x0979 0x097F ?C) ; LETTER ZHA .. BBA
78 (0x25CC ?X) ; DOTTED CIRCLE
88 ;; Compose a consonant and a nukta
89 ((0x0928 0x093C) 0x0929)
90 ((0x0930 0x093C) 0x0931)
91 ((0x0933 0x093C) 0x0934)
92 ((0x0915 0x093C) 0x0958)
93 ((0x0916 0x093C) 0x0959)
94 ((0x0917 0x093C) 0x095A)
95 ((0x091C 0x093C) 0x095B)
96 ((0x0921 0x093C) 0x095C)
97 ((0x0922 0x093C) 0x095D)
98 ((0x092B 0x093C) 0x095E)
99 ((0x092F 0x093C) 0x095F)
105 ;; Syllable identification
109 ;; Syllables with an independent vowel
110 ("(RH)?Vn?(J?HR)?m?u?b?p?n?a?(Ss?|sS?)?A?"
113 ;; Consonant-based syllables
114 ("([CR]n?J?HJ?)*[CR]n?(H[NJ]?|m?u?b?p?n?)a?(Ss?|sS?)?A?"
117 ;; Combining marks are displayed with a DOTTED CIRCLE.
120 ((font-facility 0x25CC) < = 0x25CC >)
124 ((font-facility 0x25CC) < 0x25CC = >)
128 ((font-facility 0x25CC) < 0x25CC :otf=dev2=blwf+ >)
129 (".+" [ :otf=dev2=blwf+ ])))
135 ;; Basic shaping forms and matra reordering
139 ;; Explicit halant form starting with RA + H + ZWJ
140 (" (RHJ[CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
141 | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |)
143 ;; Explicit halant form starting with a reph
144 (" (RH)([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
145 | (1 :otf=dev2=rphf+) (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
148 ;; Other explicit halant forms
149 (" ([CRnHJ]+)(HN?a?(Ss?|sS?)?A?) "
150 | (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+) (2 = *) |)
152 ;; Ordinary syllables starting with RA + H + ZWJ
154 (" (RHJ[CRnHJ]*)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
156 ;; This is an asterisk. If it were a plus sign, an isolated RHJ
157 ;; would match with the next pattern, not with this one.
158 | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
161 ;; Ordinary syllables starting with a reph
163 (" (RH)([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
164 | (3 = *) (1 :otf=dev2=rphf+)
165 (2 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
168 ;; Other ordinary syllables
170 (" ([CRnHJV]+)(mn?)?(u?b?p?n?a?(Ss?|sS?)?A?) "
171 | (2 = *) (1 :otf=dev2=locl,nukt,akhn,rkrf,blwf,half,vatu,cjct+)
178 ;; Final reordering #1 (Move pre-base matra after the last halant)
183 (" (mn?)([^ ]+H[JS]?)([^H ]+) "
184 | (2 = *) (1 = *) (3 = *) |)
190 ;; Final reordering #2 (Move reph after the first halant)
194 ;; Syllables with a reph and an explicit halant
196 (" (mn?)?(r)([^H ]+HJ?)([^ ]*) "
197 | (1 = *) (3 = *) (2 =) (4 = *) |)
199 ;; A reph without explicit halant
201 (" (mn?)?(r)([^aSsA ]+)(a?(Ss?|sS?)?A?) "
202 | (1 = *) (3 = *) (2 =) (4 = *) |)
208 ;; Nukta for matra and presentation forms
213 | (1 :otf=dev2=nukt,pres,abvs,blws,psts,haln,calt+) |)
234 (1 :otf=dev2=+kern,dist,abvm,blwm))
239 ;; Copyright (C) 2010
240 ;; National Institute of Advanced Industrial Science and Technology (AIST)
241 ;; Registration Number H15PRO112
243 ;; This file is part of the m17n database; a sub-part of the m17n
246 ;; The m17n library is free software; you can redistribute it and/or
247 ;; modify it under the terms of the GNU Lesser General Public License
248 ;; as published by the Free Software Foundation; either version 2.1 of
249 ;; the License, or (at your option) any later version.
251 ;; The m17n library is distributed in the hope that it will be useful,
252 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
253 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
254 ;; Lesser General Public License for more details.
256 ;; You should have received a copy of the GNU Lesser General Public
257 ;; License along with the m17n library; if not, write to the Free
258 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
259 ;; Boston, MA 02110-1301, USA.