Add dev2, bng2, gur2, gjr2, ory2, tml2, tel2, knd2 and mlm2.
[m17n/m17n-db.git] / FLT / KHMR-MULE.flt
1 ;; KHMR-MULE.flt -- Font Layout Table for Khmer (mule font)
2 ;; Copyright (C) 2003, 2004, 2007  AIST (H15PRO112)
3 ;; See the end for copying conditions.
4
5 (font layouter khmr-mule nil
6       (font (mulekhmer-1)))
7
8 ;;; <li> KHMR-MULE.flt
9 ;;;
10 ;;; For Khmer fonts of mule encoding to draw Khmer script.  The font is
11 ;;; available at: <ftp://ftp.m17n.org/m17n-fonts/>
12
13 (category
14  (0x1780 0x17A2 ?C) ;; C: CONSONANT (except R and KHMER LETTER LA)
15  (0x179A        ?R) ;; R: KHMER LETTER RO
16  (0x17A1        ?E) ;; E: ELSE
17  (0x17A3 0x17A4 ?E)
18  (0x17A5 0x17B3 ?V) ;; V: INDEPENDENT VOWEL (except Q)
19  (0x17A7        ?Q) ;; Q: CONJUNCT VOWEL QU, RY, QE
20  (0x17AB        ?Q)
21  (0x17AF        ?Q)
22  (0x17B2        ?C)
23  (0x17B4 0x17FF ?E)
24  (0x17B6 0x17C5 ?v) ;; v: DEPENDENT VOWEL
25  (0x17C6        ?S) ;; S: COMBINING SIGN
26  (0x17C9 0x17CA ?s) ;; s: SHIFT
27  (0x17CB 0x17D3 ?S)
28  (0x17D2        ?c) ;; c: KHMER SIGN COENG (function as virama)
29  )
30
31 (generator
32  (0
33   (cond
34    ("[CR](c[CRQ])?(cR)?s?v?S?"
35     (cond
36      (".(c[CRQ])(cR)?s?v?S?"
37       < |
38       ("(.)c(.)(c(.))?" (1 independent) (2 conjunct) (4 conjunct))
39       vowel-and-sign *
40       | > )
41      ("[CR][svS][svS]*" < | independent vowel-and-sign * | > )
42      ("." independent)))
43    ("." independent))
44   *)
45
46  (independent
47   (cond
48    ((0x17D8)                    0xD4 0x9B 0xD4)
49    ((range 0x1780 0x17FF)       0x80)))
50
51  (conjunct
52   (cond
53    ((0x1783)    Br.Bc 0x43)
54    ((0x1788)    Br.Bc 0x48)
55    ((0x178D)    Br.Bc 0x4D)
56    ((0x1794)    Br.Bc 0x54)
57    ((0x1799)    Br.Bc 0x59)
58    ((0x179A)    Bl<Bc 0x5A)
59    ((range 0x179E 0x179F)       Br.Bc 0x5E)
60    ((range 0x1780 0x17AF)       bc-tc 0x40)
61    ))
62
63  (vowel-and-sign
64   (cond
65    ((0x17B6)    Br.Bl 0xB6)
66    ((0x17BB)    br+tr 0xBB)
67    ((0x17BC)    bc-tc 0xBC)
68    ((0x17BD)    bc-tc 0xBD)
69    ((0x17BE)    tc.bc 0xB8 Bl.Br 0xC1)
70    ((0x17BF)    Bl.Br 0xC1 Br.Bc 0x04)
71    ((0x17C0)    Bl.Br 0xC1 Br.Bc 0x05)
72    ((0x17C1)    Bl.Br 0xC1)
73    ((0x17C2)    Bl.Br 0xC2)
74    ((0x17C3)    Bl.Br 0xC3)
75    ((0x17C4)    Bl.Br 0xC1 Br.Bl 0xB6)
76    ((0x17C5)    Bl.Br 0xC1 Br.Bl 0x2D)
77    ((0x17C9)    tr+br 0xC9)
78    ((0x17CB)    tr+br 0xCB)
79    ((0x17CE)    tr+br 0xCE)
80    ((range 0x17B7 0x17D0)       tc+bc 0xB7))))
81
82 (category
83  (0x00 0xFF     ?E)
84  (0x04 0x05     ?V)
85  (0x2D          ?V)
86  (0xB6          ?V)
87  (0xC6          ?C)
88  (0xCB          ?R)
89  (0xCC 0xCD     ?C)
90  (0xCE          ?R)
91  (0xCF 0xD0     ?C)
92  (0xD2          ?E))
93
94 (generator
95  (0
96   (cond
97    ("VC" = tc>20bc =)
98    ("VR" = tr<20br =)
99    ("." =))
100   *))
101
102 (category
103  (0x00 0xFF     ?E) ;; E: else
104  (0x40 0x6F     ?c) ;; c: conjunct CONSONANT
105  (0x49          ?n) ;; n: conjunct KHMER LETTER NYO
106  (0x59          ?y) ;; y: conjunct KHMER LETTER YO
107  (0x80 0xA2     ?C) ;; C: first CONSONANT
108  (0x89          ?N) ;; N: first KHMER LETTER NYO
109  (0xB2          ?Q) ;; Q: KHMER INDEPENDENT VOWEL QOO TYPE TWO
110  (0xC9 0xD1     ?S))
111
112 (generator
113  (0
114   (cond
115    (" [^ ][^ ][^ ]* "
116     < =
117     (cond
118      ("N[cny]"  0x27 ((0x49) bc-tc 0x28) =)
119      ("Qy"      0x2B))
120     = * > )
121    ("[^ ]*" = * ))
122   *))
123
124 (category
125  (0x00 0x7F     ?n) ;; n: width:normal height:normal depth:deep
126  (0x04 0x05     ?V) ;; V: right part of KHMER VOWEL SIGN YA and IE
127  (0x26          ?w) ;; w: width:wide height:normal depth:deep
128  (0x27          ?W) ;; W: width:wide height:normal depth:normal
129  (0x28          ?w)
130  (0x2A          ?w)
131  (0x2C          ?N) ;; N: width:normal height:normal depth:normal
132  (0x43          ?w)
133  (0x48 0x49     ?w)
134  (0x4D 0x4E     ?w)
135  (0x5A          ?r) ;; r: conjunct KHMER LETTER RO
136  (0x60          ?w)
137  (0x80 0xFF     ?N)
138  (0x83          ?W)
139  (0x84          ?T) ;; T: width:normal height:high depth:normal
140  (0x87          ?T)
141  (0x88 0x89     ?W)
142  (0x8A 0x8B     ?T)
143  (0x8D 0x8E     ?W)
144  (0x90          ?T)
145  (0x95          ?T)
146  (0x99          ?W)
147  (0x9B          ?W)
148  (0x9F 0xA0     ?W)
149  (0xA6          ?W))
150
151 (generator
152  (0
153   (cond
154    (" ([^ ]*) "
155     <
156     (1
157      (cond
158       ("(Wnr)([^V]*)(V)?(.*)" = *)
159       ("(Tnr)([^V]*)(V)?(.*)"
160        (1 = = ((0x5A) Bl<Bc 0x20) =) (2 = *) (3 high-deep-YA-IE =) (4 = *))
161       ("(..r)([^V]*)(V)?(.*)"
162        (1 = = ((0x5A) Bl<Bc 0x20) =) (2 = *) (3 deep-YA-IE =) (4 = *))
163       ("(T[nw][^V]*)(V)?(.*)"
164        (1 = *) (2 high-deep-YA-IE =) (3 = *))
165       ("(.[nw][^V]*)(V)?(.*)"
166        (1 = *) (2 deep-YA-IE =) (3 = *))
167       ("(T^V*)(V)?(.*)"
168        (1 = *) (2 high-YA-IE =) (3 = *))
169       (".*" = *)))
170     >)
171    ("[^ ]*" = *))
172   *)
173
174  (deep-YA-IE
175   ((range 0x04 0x05)    Br.Bc 0x24))
176
177  (high-deep-YA-IE
178   ((range 0x04 0x05)    Br.Bc 0x34))
179
180  (high-YA-IE
181   ((range 0x04 0x05)    Br.bc 0x14)))
182
183 ;; Copyright (C) 2003, 2004, 2007
184 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
185 ;;   Registration Number H15PRO112
186
187 ;; This file is part of the m17n database; a sub-part of the m17n
188 ;; library.
189
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.
194
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.
199
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.
204
205 ;; Local Variables:
206 ;; mode: lisp
207 ;; End: