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