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