Add TELUGU LETTER TSA,DZA (U+0C58,U+0C59) and TELUGU VOWEL SIGN
[m17n/m17n-db.git] / FLT / TELU-OTF.flt
1 ;; TELU-OTF.flt -- Font Layout Table for Telugu OpenType fonts
2 ;; Copyright (C) 2004, 2007  AIST (H15PRO112)
3 ;; See the end for copying conditions.
4
5 (font layouter telu-otf nil
6       (font (nil nil unicode-bmp :otf=telu=blwf)))
7
8 ;;; <li> TELU-OTF.flt
9 ;;;
10 ;;; For Telugu OpenType fonts to draw the Telugu script.
11
12 (category
13  ;; C: consonant
14  ;; H: HALANT
15  ;; u: vowel sign (above)
16  ;; p: vowel sign (post)
17  ;; b: vowel sign (below)
18  ;; a: vowel modifier (post)
19  ;; V: independent vowel
20  ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
21  ;; J: ZWJ (ZERO WIDTH JOINER)
22  ;; X: generic
23  (0x0C00 0x0C7F ?E)                     ; generic
24  (0x0C01 0x0C03 ?a)                     ; SIGN CANDRABINDU .. VISARGA
25  (0x0C05 0x0C14 ?V)                     ; LETTER A .. AU
26  (0x0C15 0x0C39 ?C)                     ; LETTER KA .. HA
27  (0x0C3E 0x0C40 ?u)                     ; VOWEL SIGN AA .. II
28  (0x0C41 0x0C44 ?p)                     ; VOWEL SIGN U .. VOCALIC RR
29  (0x0C46 0x0C47 ?u)                     ; VOWEL SIGN E .. EE
30  (0x0C4A 0x0C4C ?u)                     ; VOWEL SIGN O .. AU
31  (0x0C4D        ?H)                     ; SIGN VIRAMA
32  (0x0C55        ?u)                     ; LENGTH MARK
33  (0x0C56        ?b)                     ; AI LENGTH MARK
34  (0x0C58 0x0C59 ?C)                     ; LETTER TSA .. DZA
35  (0x0C60 0x0C61 ?V)                     ; LETTER VOCALIC RR .. VOCALIC LL
36  (0x0C62 0x0C63 ?b)                     ; VOWEL SIGN VOCALIC L .. LL
37  (0x0964 0x0965 ?X)                     ; DANDA .. DOUBLE DANDA
38  (0x200C        ?N)                     ; ZWNJ
39  (0x200D        ?J)                     ; ZWJ
40  )
41
42 ;; Decompose two-part vowels.
43 (generator
44  (0
45   (cond
46    ((0x0C48)
47     0x0C46 0x0C56)
48    ("." =))
49   *))
50
51 ;; Syllable identification and reordering.  The base consonant is
52 ;; always the first one, because all Telugu consonants have a below
53 ;; form.
54 (generator
55  (0
56   (cond
57    ;; A syllable with a vowel sign.
58    ;;1  23     4      5
59    ("(C)((HC)*)(ub?|p)(a)?"
60     < | (1 =) (2 move-h) (4 = *) (5 =) | >)
61
62    ;; A syllable with a vowel modifier.
63    ;;1  23     4
64    ("(C)((HC)*)(a)"
65     < | (1 =) (2 move-h) (4 =) | >)
66
67    ;; No vowel signs, no vowel modifiers.  If the syllable ends with a
68    ;; Halant, cancel the Halant movement.
69    ;;1  23     4
70    ("(C)((HC)*)(HN?)?"
71     < | (1 =) (4 0x0C4D) (2 move-h) | >)
72
73    ;; A syllable starting with an independent vowel.
74    ("Va?"
75     < | = * | >)
76
77    ("." =))
78   *)
79
80  (move-h
81   (cond
82    ("(H)(.+)"
83     (2 = *) (1 =)))))
84
85 ;; Apply OTF features.  In case of Telugu, 'akhn' is applied after
86 ;; reordering.
87 (generator
88  (0
89   (cond
90    ;; A syllable that ends with a Halant.
91    (" (CH)([^ ]*) "
92     (1 otf:telu=haln+) (2 otf:telu=akhn,blwf,abvs,blws,psts+abvm,blwm,dist))
93
94    ;; Ordinary syllables.
95    (" ([^ ]+) "
96     (1 otf:telu=akhn,blwf,abvs,blws,psts+absm,blwm,dist))
97
98    ("."
99     [ = ]))
100   *))
101
102 ;; Copyright (C) 2004, 2007
103 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
104 ;;   Registration Number H15PRO112
105
106 ;; This file is part of the m17n database; a sub-part of the m17n
107 ;; library.
108
109 ;; The m17n library is free software; you can redistribute it and/or
110 ;; modify it under the terms of the GNU Lesser General Public License
111 ;; as published by the Free Software Foundation; either version 2.1 of
112 ;; the License, or (at your option) any later version.
113
114 ;; The m17n library is distributed in the hope that it will be useful,
115 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
116 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
117 ;; Lesser General Public License for more details.
118
119 ;; You should have received a copy of the GNU Lesser General Public
120 ;; License along with the m17n library; if not, write to the Free
121 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
122 ;; Boston, MA 02110-1301, USA.
123
124 ;; Local Variables:
125 ;; mode: emacs-lisp
126 ;; End: