Versions changed to 1.6.1.
[m17n/m17n-db.git] / FLT / TIBT-OTF.flt
1 ;; TIBT-OTF.flt -- Font Layout Table for Tibetan (OpenType font)
2 ;; Copyright (C) 2005, 2007  AIST (H15PRO112)
3 ;; See the end for copying conditions.
4
5 (font layouter tibt-otf nil
6       (font (nil nil unicode-bmp :otf=tibt=ccmp,blws,abvs)))
7
8 ;;; <li> TIBT-OTF.flt
9 ;;;
10 ;;; For TibetanMachineUniAlpha.ttf to draw Tibetan script.
11 ;;; The font is available at:
12 ;;; <ul>
13 ;;; <li> debian package: ttf-tmuni
14 ;;; </ul>
15
16 ;; Step 0: Reordering Characters
17 ;;
18 ;; According to the Unicode canonical combining class value (CCCV),
19 ;; Tibetan combining characters must be orderd in the following way:
20 ;;
21 ;; MARK HALANTA (CCCV=9)
22 ;; VOWEL SIGN AA (129)
23 ;; Above base vowel signs (130)
24 ;; VOWEL SIGN U (132)
25 ;; MARK TSA -PHRU (216)
26 ;;
27 ;; However, the current font expects the following order:
28 ;;
29 ;; MARK TSA -PHRU
30 ;; VOWEL SIGN AA
31 ;; VOWEL SIGN U
32 ;; MARK HALANTA
33 ;; Above base vowel signs
34
35 (category
36  (0x0F00 0x0FCF         ?x)             ; default
37  (0x0F39                ?T)             ; MARK TSA -PHRU
38  (0x0F71                ?A)             ; VOWEL SIGN AA
39  (0x0F72                ?V)             ; VOWEL SIGN I
40  (0x0F74                ?U)             ; VOWEL SIGN U
41  (0x0F7A 0x0F7D         ?V)             ; VOWEL SIGN E .. VOWEL SIGN OO
42  (0x0F80                ?V)             ; VOWEL SIGN REVERSED I
43  (0x0F84                ?H))            ; MARK HALANTA
44
45 (generator
46  (0
47   (cond
48    ("x+"
49     = *)
50    ("(H?)(A*)(V?)(U*)(T?)"
51     (5 =) (2 = *) (4 = *) (1 =) (3 =)))
52   *))
53
54 ;; Step 1: Syllable identification
55
56 ;; C: Consonants
57 ;; T: MARK TSA -PHRU
58 ;; c: Subjoind consonants
59 ;; A: VOWEL SIGN AA
60 ;; U: VOWEL SIGN U
61 ;; H: MARK HALANTA
62 ;; V: Above or two-part vowel signs
63 ;; S: Above base signs
64 ;; s: Other above base signs
65 ;; x: Others
66
67 (category
68  (0x0F00 0x0FCF         ?x)             ; default
69  (0x0F39                ?T)             ; MARK TSA -PHRU
70  (0x0F40 0x0F6A         ?C)             ; LETTER KA .. LETTER FIXED-FORM RA
71  (0x0F71                ?A)             ; VOWEL SIGN AA
72  (0x0F72 0x0F7E         ?V)             ; VOWEL SIGN I .. SIGN RJES SU NGA RO
73  (0x0F74                ?U)             ; VOWEL SIGN U
74  (0x0F80 0x0F81         ?V)             ; VOWEL SIGN REVERSED I, REVERSED II
75  (0x0F82 0x0F83         ?S)             ; SIGN NYI ZLA NAADA, SIGN SNA LDAN
76  (0x0F84                ?H)             ; MARK HALANTA
77  (0x0F86 0x0F87         ?s)             ; SIGN LCI RTAGS, SIGN YANG RTAGS
78  (0x0F88 0x0F89         ?C)             ; SIGN LCE TSA CAN, SIGN MCHU CAN
79  (0x0F90 0x0FBC         ?c))            ; SUBJOIND LETTER KA .. FIXED-FORM RA
80
81 (generator
82  (0
83   (cond
84    ;; For some reason, it is better not to apply the abvs feature when
85    ;; both A and U exist.
86    ("(C)(T?)(c*)(A*)(U*)(H?)(V*)(S*)(s*)"
87     < otf:tibt=ccmp,blws,abvs >)
88    ("."
89     =))
90   *))
91
92 ;; Copyright (C) 2005, 2007
93 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
94 ;;   Registration Number H15PRO112
95
96 ;; This file is part of the m17n database; a sub-part of the m17n
97 ;; library.
98
99 ;; The m17n library is free software; you can redistribute it and/or
100 ;; modify it under the terms of the GNU Lesser General Public License
101 ;; as published by the Free Software Foundation; either version 2.1 of
102 ;; the License, or (at your option) any later version.
103
104 ;; The m17n library is distributed in the hope that it will be useful,
105 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
106 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
107 ;; Lesser General Public License for more details.
108
109 ;; You should have received a copy of the GNU Lesser General Public
110 ;; License along with the m17n library; if not, write to the Free
111 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
112 ;; Boston, MA 02110-1301, USA.
113
114 ;; Local Variables:
115 ;; mode: lisp
116 ;; coding: utf-8
117 ;; End: