*** empty log message ***
[m17n/m17n-db.git] / TAML-OTF.flt
1 ;; TML-OTF.flt -- Font Layout Table for Tamil OpenType fonts
2 ;; Copyright (C) 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-OTF.flt
25 ;;;
26 ;;; For Tamil OpenType fonts to draw Tamil.
27 ;;; Fonts are available from <http://sourceforge.net/projects/tamillinux/>.
28
29 (category
30  ;; C: general consonant
31  ;; V: independent vowel
32  ;; H: HALANT
33  ;; m: MATRA (pre)
34  ;; u: MATRA (above)
35  ;; b: MATRA (below)
36  ;; p: MATRA (post)
37  ;; A: vowel modifier (above)
38  ;; a: vowel modifier (post)
39  ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
40  ;; J: ZWJ (ZERO WIDTH JOINER)
41  ;; E: ELSE
42  ;;
43  (0x200C        ?N)                     ; ZWNJ
44  (0x200D        ?J)                     ; ZWJ
45  (0x0964        ?E)                     ; DANDA
46  (0x0965        ?E)                     ; DOUBLE DANDA
47  (0x0B80 0x0BFF ?E)                     ; ELSE
48  (0x0B85 0x0B94 ?V)                     ; LETTER AA .. LETTER AU
49  (0x0B95 0x0BB9 ?C)                     ; LETTER KA .. LETTER HA
50  (0x0BBE        ?p)                     ; VOWEL SIGN AA (post)
51  (0x0BBF        ?p)                     ; VOWEL SIGN I (post)
52  (0x0BC0        ?u)                     ; VOWEL SIGN II (above)
53  (0x0BC1        ?b)                     ; VOWEL SIGN U (below)
54  (0x0BC2        ?b)                     ; VOWEL SIGN UU (below)
55  (0x0BC6 0x0BC8 ?m)                     ; VOWEL SIGN E, EE, AI (pre)
56  (0x0BCA 0x0BCC ?t)                     ; VOWEL SIGN O, OO, AU (two-part)
57  (0x0BCD        ?H)                     ; VIRAMA
58  (0x0BD7        ?p)                     ; AU LENGTH MARK (post)
59  )
60
61 ;; Step 1 : Syllable identification.
62 (generator
63  (0
64   (cond
65    ;; A syllable ending with a two-part vowel sign.
66    ("((CH)*C)(t)"
67     < | (1 otf:taml=akhn) (3 two-part) | >)
68
69    ;; A syllable ending with a vowel sign.
70    ("((CH)*C)([mubp])"
71     < | (1 otf:taml=akhn) (3 =) | >)
72
73    ;; No vowel sign.
74    ("(CH)*CH?"
75     < | otf:taml=akhn | >)
76
77    ;; A variation of AU.
78    ((0x0B92 0x0BD7)
79     0x0B94)
80
81    ("." =))
82   *)
83
84  (two-part
85   (cond
86    ((0x0BCA)
87     0x0BC6 0x0BBE)
88    ((0x0BCB)
89     0x0BC7 0x0BBE)
90    ((0x0BCC)
91     0x0BC6 0x0BD7))))
92
93 ;; Step 2 : Matra movements.
94 (generator
95  (0
96   (cond
97    (" ([^ mubp]*)([^ mubp])(m)?([ubp])? "
98     | (1 = *) (3 =) (2 =) (4 =) |)
99    ("." =))
100   *))
101
102 ;; Step 3 : OTF substitutions and positionings.
103 (generator
104  (0
105   (cond
106    (" ([^ ]*) "
107     (1 otf:taml))
108    ("."
109     [ otf:taml=+ ]))
110   *))
111
112 ;; Local Variables:
113 ;; mode: emacs-lisp
114 ;; End: