*** empty log message ***
[m17n/m17n-db.git] / TML-CDAC.flt
1 ;; TML-CDAC.flt -- Font Layout Table for Tamil (C-DAC 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., 59 Temple Place, Suite 330, Boston, MA
22 ;; 02111-1307, USA.
23
24 ;;; <li> TML-CDAC.flt
25 ;;;
26 ;;; For the font TMVL0ntt.ttf (developped by C-DAC, encoding is ISFOC)
27 ;;; to draw Tamil script.  The font is available at:
28 ;;; <ul>
29 ;;; <li>        infopage: http://www.iiit.net/ltrc/iscii/FAQ.htm#SEC2.1
30 ;;; <li> download: http://www.iiit.net/ltrc/iscii/iscii_plugin_linux.tar.gz
31 ;;; </ul>
32
33 (category
34  ;; C: CONSONANT
35  ;; I: INDEPENDENT VOWEL
36  ;; R: DEPENDENT VOWEL RIGHT
37  ;; L: DEPENDENT VOWEL LEFT
38  ;; B: DEPENDENT VOWEL LEFT AND RIGHT TYPE 1
39  ;; b: DEPENDENT VOWEL LEFT AND RIGHT TYPE 2
40  ;; V: VIRAMA
41  ;; E: ELSE
42  ;;
43  (0x0B83        ?E)
44  (0x0B85 0x0B8A ?I)
45  (0x0B8E 0x0B90 ?I)
46  (0x0B92 0x0B94 ?I)
47  (0x0B95        ?C)
48  (0x0B99 0x0B9A ?C)
49  (0x0B9C        ?C)
50  (0x0B9E 0x0B9F ?C)
51  (0x0BA3 0x0BA4 ?C)
52  (0x0BA8 0x0BAA ?C)
53  (0x0BAE 0x0BB5 ?C)
54  (0x0BB7 0x0BB9 ?C)
55  (0x0BBE 0x0BC2 ?R)
56  (0x0BC6 0x0BC8 ?L)
57  (0x0BCA        ?B)
58  (0x0BCB        ?b)
59  (0x0BCC        ?B)
60  (0x0BCD        ?V)
61  (0x0BD7        ?E))
62
63 ;; CHAR->GLYPH STAGE
64 (generator
65  (0
66   (cond
67    ("((CV)*)(C)(R)"
68     (1 consonant-virama *)
69     (3 consonant)
70     (4 dependent-vowel))
71    ("((CV)*)(C)(L)"
72     <
73     (4 dependent-vowel)
74     (1 consonant-virama *)
75     (3 consonant)
76     >)
77    ("((CV)*)(C)(B)"
78     <
79     0xAA
80     (1 consonant-virama *)
81     (3 consonant)
82     (4 dependent-vowel)
83     >)
84    ("((CV)*)(C)(b)"
85     <
86     0xAB
87     (1 consonant-virama *)
88     (3 consonant)
89     (4 dependent-vowel)
90     >)
91    ("CV"
92     < consonant-virama >)
93    ("[RLBb]"
94     isolated-dependent-vowel)
95    ("." independent consonant))
96   *)
97
98  (consonant-virama
99   (cond
100    ((0x0B95 0x0BCD)     0xE8 0xA2)      ; k
101    ((0x0B99 0x0BCD)     0xE9 0xA2)      ; n^
102    ((0x0B9A 0x0BCD)     0xEA 0xA2)      ; c
103    ((0x0B9E 0x0BCD)     0xEB 0xA2)      ; n~
104    ((0x0B9F 0x0BCD)     0xEC 0xA2)      ; t.
105    ((0x0BA3 0x0BCD)     0xED 0xA2)      ; n.
106    ((0x0BA4 0x0BCD)     0xEE 0xA2)      ; t
107    ((0x0BA8 0x0BCD)     0xEF 0xA2)      ; n
108    ((0x0BAA 0x0BCD)     0xF0 0xA2)      ; p
109    ((0x0BAE 0x0BCD)     0xF1 0xA2)      ; m
110    ((0x0BAF 0x0BCD)     0xF2 0xA2)      ; y
111    ((0x0BB0 0x0BCD)     0xF3 0xA2)      ; r
112    ((0x0BB2 0x0BCD)     0xF4 0xA2)      ; l
113    ((0x0BB5 0x0BCD)     0xF5 0xA2)      ; v
114    ((0x0BB4 0x0BCD)     0xF6 0xA2)      ; l_
115    ((0x0BB3 0x0BCD)     0xF7 0xA2)      ; l.
116    ((0x0BB1 0x0BCD)     0xF8 0xA2)      ; r_
117    ((0x0BA9 0x0BCD)     0xA1)           ; n_
118    ((0x0BB8 0x0BCD)     0x76)           ; s
119    ((0x0BB7 0x0BCD)     0x77)           ; s'
120    ((0x0B9C 0x0BCD)     0x78)           ; j
121    ((0x0BB9 0x0BCD)     0x79)           ; h
122    ))
123
124  (consonant
125   (cond
126    ((0x0B95)    0xE8)                   ; k
127    ((0x0B99)    0xE9)                   ; n^
128    ((0x0B9A)    0xEA)                   ; c
129    ((0x0B9E)    0xEB)                   ; n~
130    ((0x0B9F)    0xEC)                   ; t.
131    ((0x0BA3)    0xED)                   ; n.
132    ((0x0BA4)    0xEE)                   ; t
133    ((0x0BA8)    0xEF)                   ; n
134    ((0x0BAA)    0xF0)                   ; p
135    ((0x0BAE)    0xF1)                   ; m
136    ((0x0BAF)    0xF2)                   ; y
137    ((0x0BB0)    0xF3)                   ; r
138    ((0x0BB2)    0xF4)                   ; l
139    ((0x0BB5)    0xF5)                   ; v
140    ((0x0BB4)    0xF6)                   ; l_
141    ((0x0BB3)    0xF7)                   ; l.
142    ((0x0BB1)    0xF8)                   ; r_
143    ((0x0BA9)    0xF9)                   ; n_
144    ((0x0BB8)    0xFA)                   ; s
145    ((0x0BB7)    0xFB)                   ; s'
146    ((0x0B9C)    0xFC)                   ; j
147    ((0x0BB9)    0xFD)                   ; h
148    ))
149    
150  (dependent-vowel
151   (cond
152    ((0x0BBE)    0xA3)                   ; a~
153    ((0x0BBF)    0xA4)                   ; i
154    ((0x0BC0)    0xA6)                   ; i~
155    ((0x0BC1)    0xA7)                   ; u
156    ((0x0BC2)    0xA8)                   ; u~
157    ((0x0BC6)    0xAA)                   ; e
158    ((0x0BC7)    0xAB)                   ; e~
159    ((0x0BC8)    0xAC)                   ; ai
160    ((0x0BCA)    0xA3)                   ; o (right part)
161    ((0x0BCB)    0xA3)                   ; o~ (right part)
162    ((0x0BCC)    0xF7)                   ; au (right part)
163    ))
164
165  (independent
166   (cond
167    ;; VOWELS
168    ((0x0B85)    0xDC)                   ; a
169    ((0x0B86)    0xDD)                   ; a~
170    ((0x0B87)    0xDE)                   ; i
171    ((0x0B88)    0xDF)                   ; i~
172    ((0x0B89)    0xE0)                   ; u
173    ((0x0B8A)    0xE1)                   ; u~
174    ((0x0B8E)    0xE2)                   ; e
175    ((0x0B8F)    0xE3)                   ; e~
176    ((0x0B90)    0xE4)                   ; ai
177    ((0x0B92)    0xE5)                   ; o
178    ((0x0B93)    0xE6)                   ; o~
179    ((0x0B94)    0xE5 0xF7)              ; au
180    ;; VISARGA
181    ((0x0B83)    0xE7)
182    ))
183
184  (isolated-dependent-vowel
185   (cond
186    ((0x0BBE)    0x81 0xA3)              ; a~
187    ((0x0BBF)    0x81 0xA4)              ; i
188    ((0x0BC0)    0x81 0xA6)              ; i~
189    ((0x0BC1)    0x81 0xA7)              ; u
190    ((0x0BC2)    0x81 0xA8)              ; u~
191    ((0x0BC6)    0xAA 0x81)              ; e
192    ((0x0BC7)    0xAB 0x81)              ; e~
193    ((0x0BC8)    0xAC 0x81)              ; ai
194    ((0x0BCA)    0xAA 0x81 0xA3)         ; o
195    ((0x0BCB)    0xAB 0x81 0xA3)         ; o~
196    ((0x0BCC)    0xAA 0x81 0xF7)         ; au
197    )))
198
199 ;; LIGATURE STAGE
200 (category
201  ;; C: CONSONANT (except for K, R, S)
202  ;; K: CONSONANT K
203  ;; R: CONSONANT R
204  ;; S: CONSONANT S'
205  ;; V: LIGATURE VOWEL (OR RIGHT PART OF VOWEL) (except for I)
206  ;; I: DEPENDENT VOWEL I
207  ;; i: DEPENDENT VOWEL I~
208  ;; v: VIRAMA
209  ;; E: ELSE
210  ;;
211  (0x00 0xFF     ?E)
212  (0xA2          ?v)
213  (0xE9 0xFD     ?C)
214  (0xE8          ?K)
215  (0xF3          ?R)
216  (0xFB          ?S)
217  (0xA4          ?I)                     ; i
218  (0xA6          ?i)                     ; i~
219  (0xA7 0xA8     ?V)                     ; u, u~
220  )
221
222 (generator
223  (0
224   (cond
225    ("KvSv"      0x7A)
226    ("KvS[Ii]"
227     ligature-ks)
228    ("KvS"       0xFE)
229    ("[CKRS][IiV]"
230     ligature = =)
231    ("SvRi"      0xFF)
232    ("."
233     =))
234   *)
235      
236  (ligature-ks
237   (cond
238    ((0xE8 0xA2 0xFB 0xA4)       0x56)   ; ksi
239    ((0xE8 0xA2 0xFB 0xA6)       0x72)   ; ksi~
240    ))
241
242  (ligature
243   (cond
244    ((0xE8 0xA2 0x76 0xA2)       0x7A)   ; ks.
245
246    ((0xE8 0xA4)         0x41)           ; ki
247    ((0xE9 0xA4)         0x42)           ; n^i
248    ((0xEA 0xA4)         0x43)           ; ci
249    ((0xEB 0xA4)         0x44)           ; n~i
250    ((0xEC 0xA4)         0xAE)           ; t.i
251    ((0xED 0xA4)         0x45)           ; n.i
252    ((0xEE 0xA4)         0x46)           ; ti
253    ((0xEF 0xA4)         0x47)           ; ni
254    ((0xF0 0xA4)         0x48)           ; pi
255    ((0xF1 0xA4)         0x49)           ; mi
256    ((0xF2 0xA4)         0x4A)           ; yi
257    ((0xF3 0xA4)         0x4B)           ; ri
258    ((0xF4 0xA4)         0x4C)           ; li
259    ((0xF5 0xA4)         0x4D)           ; vi
260    ((0xF6 0xA4)         0x4E)           ; l_i
261    ((0xF7 0xA4)         0x4F)           ; l.i
262    ((0xF8 0xA4)         0x50)           ; r_i
263    ((0xF9 0xA4)         0x51)           ; n_i
264    ((0xFA 0xA4)         0x52)           ; si
265    ((0xFB 0xA4)         0x53)           ; s'i
266    ((0xFC 0xA4)         0x54)           ; ji
267    ((0xFD 0xA4)         0x55)           ; hi
268
269    ((0xE8 0xA6)         0x57)           ; ki~
270    ((0xE9 0xA6)         0x58)           ; n^i~
271    ((0xEA 0xA6)         0x59)           ; ci~
272    ((0xEB 0xA6)         0x5A)           ; n~i~
273    ((0xEC 0xA6)         0xAF)           ; t.i~
274    ((0xED 0xA6)         0x61)           ; n.i~
275    ((0xEE 0xA6)         0x62)           ; ti~
276    ((0xEF 0xA6)         0x63)           ; ni~
277    ((0xF0 0xA6)         0x64)           ; pi~
278    ((0xF1 0xA6)         0x65)           ; mi~
279    ((0xF2 0xA6)         0x66)           ; yi~
280    ((0xF3 0xA6)         0x67)           ; ri~
281    ((0xF4 0xA6)         0x68)           ; li~
282    ((0xF5 0xA6)         0x69)           ; vi~
283    ((0xF6 0xA6)         0x6A)           ; l_i~
284    ((0xF7 0xA6)         0x6B)           ; l.i~
285    ((0xF8 0xA6)         0x6C)           ; r_i~
286    ((0xF9 0xA6)         0x6D)           ; n_i~
287    ((0xFA 0xA6)         0x6E)           ; si~
288    ((0xFB 0xA6)         0x6F)           ; s'i~
289    ((0xFC 0xA6)         0x70)           ; ji~
290    ((0xFD 0xA6)         0x71)           ; hi~
291
292    ((0xE8 0xA7)         0xB0)           ; ku
293    ((0xE9 0xA7)         0xB1)           ; n^u
294    ((0xEA 0xA7)         0xB2)           ; cu
295    ((0xEB 0xA7)         0xB3)           ; n~u
296    ((0xEC 0xA7)         0xB4)           ; t.u
297    ((0xED 0xA7)         0xB5)           ; n.u
298    ((0xEE 0xA7)         0xB6)           ; tu
299    ((0xEF 0xA7)         0xB8)           ; nu
300    ((0xF0 0xA7)         0xB9)           ; pu
301    ((0xF1 0xA7)         0xBA)           ; mu
302    ((0xF2 0xA7)         0xBB)           ; yu
303    ((0xF3 0xA7)         0xBC)           ; ru
304    ((0xF4 0xA7)         0xBD)           ; lu
305    ((0xF5 0xA7)         0xBE)           ; vu
306    ((0xF6 0xA7)         0xBF)           ; l_u
307    ((0xF7 0xA7)         0xC0)           ; l.u
308    ((0xF8 0xA7)         0xC1)           ; r_u
309    ((0xF9 0xA7)         0xC2)           ; n_u
310
311    ((0xE8 0xA8)         0xC3)           ; ku~
312    ((0xE9 0xA8)         0xC4)           ; n^u~
313    ((0xEA 0xA8)         0xC5)           ; cu~
314    ((0xEB 0xA8)         0xC6)           ; n~u~
315    ((0xEC 0xA8)         0xC7)           ; t.u~
316    ((0xED 0xA8)         0xC8)           ; n.u~
317    ((0xEE 0xA8)         0xC9)           ; tu~
318    ((0xEF 0xA8)         0xCB)           ; nu~
319    ((0xF0 0xA8)         0xCC)           ; pu~
320    ((0xF1 0xA8)         0xCD)           ; mu~
321    ((0xF2 0xA8)         0xCE)           ; yu~
322    ((0xF3 0xA8)         0xCF)           ; ru~
323    ((0xF4 0xA8)         0xD6)           ; lu~
324    ((0xF5 0xA8)         0xD7)           ; vu~
325    ((0xF6 0xA8)         0xD8)           ; l_u~
326    ((0xF7 0xA8)         0xD9)           ; l.u~
327    ((0xF8 0xA8)         0xDA)           ; r_u~
328    ((0xF9 0xA8)         0xDB)           ; n_u~
329    ))
330  )
331
332 ;; Local Variables:
333 ;; mode: lisp
334 ;; End: