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