*** empty log message ***
[m17n/m17n-db.git] / FLT / KHMR-ANLONG.flt
1 ;; KHMR-ANLONG.flt -- Font Layout Table for Khmer (Anlong font)
2 ;; Copyright (C) 2003, 2004, 2007  AIST (H15PRO112)
3 ;; See the end for copying conditions.
4
5 (font layouter khmr-anlong nil
6       (font (nil anlongvill\ khek apple-roman)))
7
8 ;;; <li> KHMR-ANLONG.flt
9 ;;;
10 ;;; For the font ANLONG.TTF to draw Khmer script.  The font is
11 ;;; available at:
12 ;;; <ul>
13 ;;; <li> infopage: http://www.freelang.com/polices/index.html
14 ;;; <li> download: http://www.freelang.com/download/fonts/ttf_khmer_anlong.zip
15 ;;; </ul>
16
17 (category
18  ;; C: CONSONANT (except R and KHMER LETTER LA)
19  ;; R: KHMER LETTER RO
20  ;; c: KHMER SIGN COENG (function as virama)
21  ;; V: INDEPENDENT VOWEL (except Q)
22  ;; Q: CONJUNCT VOWEL QU, RY, QE
23  ;; v: DEPENDENT VOWEL
24  ;; s: SHIFT
25  ;; S: COMBINING SIGN
26  ;; E: ELSE
27  (0x1780 0x17A0 ?C)
28  (0x1789        ?N)                     ; exception of C (NYO)
29  (0x179A        ?R)                     ; exception of C (RO)
30  (0x17A1        ?E)                     ; ELSE
31  (0x17A2        ?C)
32  (0x17A3 0x17A4 ?E)                     ; ELSE
33  (0x17A5 0x17B3 ?V)
34  (0x17A7        ?Q)
35  (0x17AB        ?Q)
36  (0x17AF        ?Q)
37  (0x17B2        ?C)
38  (0x17B4 0x17FF ?E)
39  (0x17B6 0x17C5 ?v)
40  (0x17C6        ?S)
41  (0x17C9 0x17CA ?s)
42  (0x17CB 0x17D3 ?S)
43  (0x17D2        ?c))
44
45 (generator
46  (0
47   (cond
48    ("([CNR]c[CNRQ])c(R)(s?v?S?)"
49     | (1 with-conjunct) (2 Bl.Br 0xEE) 0x00 (3 vowel-and-sign *) |)
50    ("([CNR]c[CNRQ])(s?v?S?)"
51     | (1 with-conjunct) 0x00 (2 vowel-and-sign *) |)
52    ("([CNR])(s?v?S?)"
53     | (1 independent) (2 vowel-and-sign *) |)
54    ("."
55     independent))
56   *)
57
58  (with-conjunct
59   (cond
60    ("(N)c(CRQ)"
61     (1 0x8B)
62     (2 conjunct))
63    ("(N)c(N)"
64     (1 0x8B)
65     (2 Br.Bl 0xDD))
66    ((0x17B3 0x17D2 0x1799)
67     0xB8)
68    ("(.)c(.)"
69     (1 independent)
70     (2 conjunct))))
71
72  (independent
73   (cond
74    ((range 0x1780 0x1788)       0x82)
75    ((0x1789)                    0x8C)
76    ((range 0x178A 0x1794)       0x91)
77    ((0x1795)                    0x9F)
78    ((range 0x1796 0x179C)       0xA1)
79    ((0x179D)                    < 0x84 cr-<cc 0xFA >)
80    ((0x179E)                    < 0x9B cr-<cc 0xFA >)
81    ((range 0x179F 0x17A2)       0xA8)
82    ((0x17A3)                    0xAB)
83    ((0x17A4)                    < 0xAB Br>Bl 0xBA >)
84    ((range 0x17A5 0x17A7)       0xAC)
85    ((0x17A8)                    < 0xAE Br.Bl 0xF4 >)
86    ((0x17A9)                    0xB9)
87    ((range 0x17AA 0x17B1)       0xAF)
88    ((0x17B2)                    0xB7)   ; same as 0xB6
89    ((0x17B3)                    < 0xAE tr<20bl 0xF8 >)
90    ((0x17B4)                    < 0xBA tr+bl 0xF5 >)
91    ((0x17B5)                    0xBA)
92    ((0x17B6)                    0xBA)
93    ((0x17B7)                    0xBB)
94    ((0x17B8)                    0xBD)
95    ((0x17B9)                    0xBF)
96    ((0x17BA)                    0xC1)
97    ((0x17BB)                    0xC3)
98    ((0x17BC)                    0xC5)
99    ((0x17BD)                    0xC7)
100    ((0x17BE)                    < 0xCD 0x20 0xBD >)
101    ((0x17BF)                    < 0xCD 0x20 Br<Bl 0xC9 >)
102    ((0x17C0)                    < 0xCD 0x20 Br<Bl 0xCB >)
103    ((range 0x17C1 0x17C3)       0xCD)
104    ((0x17C4)                    < 0xCD 0x20 Br<Bl 0xBA >)
105    ((0x17C5)                    < 0xCD 0x20 Br<Bl 0xD0 >)
106    ((0x17C6)                    0xD1)
107    ((0x17C7)                    0xD3)
108    ((0x17C8)                    0x3A)
109    ((0x17C9)                    0xF6)
110    ((range 0x17CA 0x17CB)       0xF4)
111    ((0x17CC)                    0xF8)
112    ((0x17CD)                    0xF7)
113    ((0x17CE)                    < 0x20 tc+80bc 0x2B >)
114    ((range 0x17CF 0x17D0)       0xF9)
115    ((0x17D1)                    < 0x20 tc+80bc 0x5F >)
116    ((0x17D2)                    < 0x20 bc-tc 0x5E >)
117    ((0x17D3)                    0xD1)
118    ((range 0x17D4 0x17D5)       0xFC)
119    ((0x17D6)                    0xFB)
120    ((0x17D7)                    0xFE)
121    ((0x17D8)                    < 0xFC 0xA6 0xFC >)
122    ((0x17D9)                    < 0x30 cr<10cl 0xD2 >)
123    ((0x17DA)                    0x8D)
124    ((0x17DB)                    < 0xFF br->10tl 0xC3 >)
125    ((0x17DC)                    0x53)
126    ((range 0x17E0 0x17E9)       0x30)))
127
128  (conjunct
129   (cond
130    ((0x1780)    br-tl 0xD4)
131    ((0x1781)    br-tl 0xD5)
132    ((0x1782)    br-tl 0xD6)
133    ((0x1783)    Br.Bl 0xD7)
134    ((0x1784)    br-tl 0xD8)
135    ((0x1785)    br-tl 0xD9)
136    ((0x1786)    br-tl 0xDA)
137    ((0x1787)    br-tl 0xDB)
138    ((0x1788)    Br.Bl 0xDC)
139    ((0x1789)    br-tl 0xDE)
140    ((0x178A)    br-tl 0xE3)
141    ((0x178B)    br-tl 0xDF)
142    ((0x178C)    br-tl 0xE0)
143    ((0x178D)    Br.Bl 0xE1)
144    ((0x178E)    br-tl 0xE2)
145    ((0x178F)    br-tl 0xE3)
146    ((0x1790)    br-tl 0xE4)
147    ((0x1791)    br-tl 0xE5)
148    ((0x1792)    br-tl 0xE6)
149    ((0x1793)    br-tl 0xE7)
150    ((0x1794)    Br.Bl 0xE8)
151    ((0x1795)    br-tl 0xE9)
152    ((0x1796)    br-tl 0xEA)
153    ((0x1797)    br-tl 0xEB)
154    ((0x1798)    br-tl 0xEC)
155    ((0x1799)    Br.Bl 0xED)
156    ((0x179A)    Bl+Bc 0xEE)
157    ((0x179B)    br-tl 0xEF)
158    ((0x179C)    br-tl 0xF0)
159    ((0x179D)    br-tl 0xD6 br.bl 0xFA)
160    ((0x179E)    Br.Bl 0xE8 br.bl 0xFA)
161    ((0x179F)    Br.Bl 0xF1)
162    ((0x17A0)    br-tl 0xF2)
163    ((0x17A2)    br-tl 0xF3)
164    ((0x17A7)    br-tl 0xD5 br.bl 0xC4)  ; ugly compromise
165    ((0x17AB)    br-tl 0xA1)             ; ugly compromise
166    ((0x17AF)    br-tl 0xB4)))           ; ugly compromise
167
168  (vowel-and-sign
169   (cond
170    ((0x17B6)    Br-Bl 0xBA)
171    ((0x17B7)    tr+bl 0xBB)
172    ((0x17B8)    tr+bl 0xBD)
173    ((0x17B9)    tr+bl 0xBF)
174    ((0x17BA)    tr+bl 0xC1)
175    ((0x17BB)    br+tr 0xC3)
176    ((0x17BC)    br-tl 0xC5)
177    ((0x17BD)    br-tl 0xC7)
178    ((0x17BE)    tr+bl 0xBD Bl.Br 0xCD)
179    ((0x17BF)    Br.Bl 0xC9 Bl.Br 0xCD)
180    ((0x17C0)    Br.Bl 0xCB Bl.Br 0xCD)
181    ((0x17C1)    Bl.Br 0xCD)
182    ((0x17C2)    Bl.Br 0xCE)
183    ((0x17C3)    Bl.Br 0xCF)
184    ((0x17C4)    Bl.Br 0xCD Br.Bl 0xBA)
185    ((0x17C5)    Bl.Br 0xCD Br.Bl 0xD0)
186    ((0x17C6)    tr+bl 0xD1)
187    ((0x17C7)    Br.Bl 0xD3)
188    ((0x17C8)    Br.Bl 0x3A)
189    ((0x17C9)    tr+bl 0xF6)
190    ((0x17CA)    tr+bl 0xF4)
191    ((0x17CB)    tr+bl 0xF5)
192    ((0x17CC)    tr+bl 0xF8)
193    ((0x17CD)    tr+bl 0xF7)
194    ((0x17CE)    tr+>br 0x2B)
195    ((0x17CF)    tr+bl 0xF9)
196    ((0x17D0)    tr+bl 0xFA))))
197
198 (category
199  ;;    WIDTH    HEIGHT  DEPTH
200  ;; N: normal   normal  normal
201  ;; T: normal   high    normal
202  ;; W: wide     normal  normal
203  ;; n: normal   normal  deep
204  ;; w: wide     normal  deep
205  ;; V: right part of KHMER VOWEL SIGN YA and IE
206  ;; x: separator
207  (0x00 0xFF     ?N)
208  (0x00          ?x)
209  (0x85          ?W)
210  (0x89          ?T)
211  (0x8A 0x8B     ?W)
212  (0x8C          ?w)
213  (0x91 0x92     ?T)
214  (0x93 0x94     ?W)
215  (0x97          ?T)
216  (0x9F          ?T)
217  (0xA4          ?W)
218  (0xA6          ?W)
219  (0xA8 0xA9     ?W)
220  (0xAA          ?w)
221  (0xAC          ?T)
222  (0xAD          ?w)
223  (0xAF          ?T)
224  (0xB0 0xB3     ?n)
225  (0xB5          ?n)
226  (0xB6 0xB7     ?T)
227  (0xB8          ?w)
228  (0xC9          ?V)
229  (0xCB          ?V)
230  (0xD7          ?w)
231  (0xDC 0xDE     ?w)
232  (0xE1 0xE2     ?w)
233  (0xE8          ?w)
234  (0xED          ?w)
235  (0xF1          ?w))
236
237 (generator
238  (0
239   (cond
240    (" ([^ x]*)x(V)([^ ]*) "
241     < (1 = *) (2 (cond ((0xC9) 0xCA) ((0xCB) 0xCC))) (3 = *) >)
242    (" ([^ x]*)x([^ ]*) "
243     < (1 = *) (2 = *) >)
244    (" (T[^V]*)(V)([^ ]*) "
245     < (1 = *) (2 (cond ((0xC9) Br.Bl 0xCA) ((0xCB) Br.Bl 0xCC))) (3 = *) >)
246    (" ([wn])(V)([^ ]*) "
247     < (1 = *) (2 (cond ((0xC9) 0xCA) ((0xCB) 0xCC))) (3 = *) >)
248    (" ([^ ]*) "
249     < (1 = *) >)
250    ("."
251     =))
252   *))
253
254 ;; Copyright (C) 2003, 2004, 2007
255 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
256 ;;   Registration Number H15PRO112
257
258 ;; This file is part of the m17n database; a sub-part of the m17n
259 ;; library.
260
261 ;; The m17n library is free software; you can redistribute it and/or
262 ;; modify it under the terms of the GNU Lesser General Public License
263 ;; as published by the Free Software Foundation; either version 2.1 of
264 ;; the License, or (at your option) any later version.
265
266 ;; The m17n library is distributed in the hope that it will be useful,
267 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
268 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
269 ;; Lesser General Public License for more details.
270
271 ;; You should have received a copy of the GNU Lesser General Public
272 ;; License along with the m17n library; if not, write to the Free
273 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
274 ;; Boston, MA 02110-1301, USA.
275
276 ;; Local Variables:
277 ;; mode: lisp
278 ;; End: