*** empty log message ***
[m17n/m17n-db.git] / TIBT-OTF.flt
1 ;; TIBT-OTF.flt -- Font Layout Table for Tibetan (OpenType font)
2 ;; Copyright (C) 2005
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> TIBT-OTF.flt
25 ;;;
26 ;;; For TibetanMachineUniAlpha.ttf to draw Tibetan script.
27 ;;; The font is available at:
28 ;;; <ul>
29 ;;; <li> infopage: http://www.thdl.org/
30 ;;; <li> download: http://ftp.debian.org/debian/pool/main/t/ttf-tmuni/ttf-tmuni_0.0.20040806.orig.tar.gz
31 ;;; </ul>
32
33 ;; Step 0: Reordering Characters
34 ;;
35 ;; According to the Unicode canonical combining class value (CCCV),
36 ;; Tibetan combining characters must be orderd in the following way:
37 ;;
38 ;; MARK HALANTA (CCCV=9)
39 ;; VOWEL SIGN AA (129)
40 ;; Above base vowel signs (130)
41 ;; VOWEL SIGN U (132)
42 ;; MARK TSA -PHRU (216)
43 ;;
44 ;; However, the current font expects the following order:
45 ;;
46 ;; MARK TSA -PHRU
47 ;; VOWEL SIGN AA
48 ;; VOWEL SIGN U
49 ;; MARK HALANTA
50 ;; Above base vowel signs
51
52 (category
53  (0x0F00 0x0FCF         ?x)             ; default
54  (0x0F39                ?T)             ; MARK TSA -PHRU
55  (0x0F71                ?A)             ; VOWEL SIGN AA
56  (0x0F72                ?V)             ; VOWEL SIGN I
57  (0x0F74                ?U)             ; VOWEL SIGN U
58  (0x0F7A 0x0F7D         ?V)             ; VOWEL SIGN E .. VOWEL SIGN OO
59  (0x0F80                ?V)             ; VOWEL SIGN REVERSED I
60  (0x0F84                ?H))            ; MARK HALANTA
61
62 (generator
63  (0
64   (cond
65    ("x+"
66     = *)
67    ("(H?)(A*)(V?)(U*)(T?)"
68     (5 =) (2 = *) (4 = *) (1 =) (3 =)))
69   *))
70
71 ;; Step 1: Syllable identification
72
73 ;; C: Consonants
74 ;; T: MARK TSA -PHRU
75 ;; c: Subjoind consonants
76 ;; A: VOWEL SIGN AA
77 ;; U: VOWEL SIGN U
78 ;; H: MARK HALANTA
79 ;; V: Above or two-part vowel signs
80 ;; S: Above base signs
81 ;; s: Other above base signs
82 ;; x: Others
83
84 (category
85  (0x0F00 0x0FCF         ?x)             ; default
86  (0x0F39                ?T)             ; MARK TSA -PHRU
87  (0x0F40 0x0F6A         ?C)             ; LETTER KA .. LETTER FIXED-FORM RA
88  (0x0F71                ?A)             ; VOWEL SIGN AA
89  (0x0F72 0x0F7E         ?V)             ; VOWEL SIGN I .. SIGN RJES SU NGA RO
90  (0x0F74                ?U)             ; VOWEL SIGN U
91  (0x0F80 0x0F81         ?V)             ; VOWEL SIGN REVERSED I, REVERSED II
92  (0x0F82 0x0F83         ?S)             ; SIGN NYI ZLA NAADA, SIGN SNA LDAN
93  (0x0F84                ?H)             ; MARK HALANTA
94  (0x0F86 0x0F87         ?s)             ; SIGN LCI RTAGS, SIGN YANG RTAGS
95  (0x0F88 0x0F89         ?C)             ; SIGN LCE TSA CAN, SIGN MCHU CAN
96  (0x0F90 0x0FBC         ?c))            ; SUBJOIND LETTER KA .. FIXED-FORM RA
97
98 (generator
99  (0
100   (cond
101    ;; For some reason, it is better not to apply the abvs feature when
102    ;; both A and U exist.
103    ("(C)(T?)(c*)(A*)(U*)(H?)(V*)(S*)(s*)"
104     otf:tibt=ccmp,blws,abvs)
105    ("."
106     =))
107   *))
108
109 ;; Local Variables:
110 ;; mode: lisp
111 ;; coding: utf-8
112 ;; End: