Register font-shape-text in
[bpt/emacs.git] / lisp / language / tibetan.el
CommitLineData
e8af40ee 1;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*-
80d75b56 2
d7a0267c 3;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
d4877ac1 4;; Free Software Foundation, Inc.
d7a0267c 5;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
eaa61218
KH
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
8f924df7
KH
8;; Copyright (C) 2003
9;; National Institute of Advanced Industrial Science and Technology (AIST)
10;; Registration Number H13PRO009
80d75b56 11
8f924df7 12;; Keywords: multilingual, Tibetan, i18n
80d75b56
KH
13
14;; This file is part of GNU Emacs.
15
16;; GNU Emacs is free software; you can redistribute it and/or modify
17;; it under the terms of the GNU General Public License as published by
d7142f3e 18;; the Free Software Foundation; either version 3, or (at your option)
80d75b56
KH
19;; any later version.
20
21;; GNU Emacs is distributed in the hope that it will be useful,
22;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;; GNU General Public License for more details.
25
26;; You should have received a copy of the GNU General Public License
27;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
28;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
29;; Boston, MA 02110-1301, USA.
80d75b56
KH
30
31;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch>
32
33;; Created: Feb. 17. 1997
34
35;; History:
a1506d29 36;; 1997.03.13 Modification for special signs and punctuations.
80d75b56 37
e8af40ee
PJ
38;;; Commentary:
39
80d75b56
KH
40;;; Code:
41
80d75b56
KH
42;;; Tibetan Character set.
43;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9
44;;; with a slight modification. And there are some subjoined
45;;; consonants which are not specified in Unicode.
46;;; I hope I can add missing characters later.
47;;;
48;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
ab3f4890 49;;;2120 // \e$(7!!\e(B \e$(7!"\e(B \e$(7!#\e(B \e$(7!$\e(B \e$(7!%\e(B \e$(7!&\e(B \e$(7!'\e(B \e$(7!(\e(B \e$(7!)\e(B \e$(7!*\e(B \e$(7!+\e(B \e$(7!,\e(B \e$(7!-\e(B \e$(7!.\e(B \e$(7!/\e(B ; obsolete glyphs (2123-5)
80d75b56
KH
50;;;2130 \e$(7!0\e(B \e$(7!1\e(B \e$(7!2\e(B \e$(7!3\e(B \e$(7!4\e(B \e$(7!5\e(B \e$(7!6\e(B \e$(7!7\e(B \e$(7!8\e(B \e$(7!9\e(B \e$(7!:\e(B \e$(7!;\e(B \e$(7!<\e(B \e$(7!=\e(B \e$(7!>\e(B \e$(7!?\e(B ; Punctuations,
51;;;2140 \e$(7!@\e(B \e$(7!A\e(B \e$(7!B\e(B \e$(7!C\e(B \e$(7!D\e(B \e$(7!E\e(B \e$(7!F\e(B \e$(7!G\e(B \e$(7!H\e(B \e$(7!I\e(B \e$(7!J\e(B \e$(7!K\e(B \e$(7!L\e(B \e$(7!M\e(B \e$(7!N\e(B \e$(7!O\e(B ; Digits and
52;;;2150 \e$(7!P\e(B \e$(7!Q\e(B \e$(7!R\e(B \e$(7!S\e(B \e$(7!T\e(B \e$(7!U\e(B \e$(7!V\e(B \e$(7!W\e(B \e$(7!X\e(B \e$(7!Y\e(B \e$(7!Z\e(B \e$(7![\e(B \e$(7!\\e(B \e$(7!]\e(B \e$(7!^\e(B \e$(7!_\e(B ; Special signs.
53;;;2160 \e$(7!`\e(B \e$(7!a\e(B \e$(7!b\e(B \e$(7!c\e(B \e$(7!d\e(B \e$(7!e\e(B \e$(7!f\e(B \e$(7!g\e(B \e$(7!h\e(B \e$(7!i\e(B \e$(7!j\e(B \e$(7!k\e(B \e$(7!l\e(B \e$(7!m\e(B \e$(7!n\e(B \e$(7!o\e(B ;
54;;;2170 \e$(7!p\e(B \e$(7!q\e(B \e$(7!r\e(B \e$(7!s\e(B \e$(7!t\e(B \e$(7!u\e(B \e$(7!v\e(B \e$(7!w\e(B \e$(7!x\e(B \e$(7!y\e(B \e$(7!z\e(B \e$(7!{\e(B \e$(7!|\e(B \e$(7!}\e(B \e$(7!~\e(B // ;
55;;;
56;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
57;;;2220 // \e$(7"!\e(B \e$(7""\e(B \e$(7"#\e(B \e$(7"$\e(B \e$(7"%\e(B \e$(7"&\e(B \e$(7"'\e(B \e$(7"(\e(B \e$(7")\e(B \e$(7"*\e(B \e$(7"+\e(B \e$(7",\e(B \e$(7"-\e(B \e$(7".\e(B \e$(7"/\e(B ; Base consonants
58;;;2230 \e$(7"0\e(B \e$(7"1\e(B \e$(7"2\e(B \e$(7"3\e(B \e$(7"4\e(B \e$(7"5\e(B \e$(7"6\e(B \e$(7"7\e(B \e$(7"8\e(B \e$(7"9\e(B \e$(7":\e(B \e$(7";\e(B \e$(7"<\e(B \e$(7"=\e(B \e$(7">\e(B \e$(7"?\e(B ; and
59;;;2240 \e$(7"@\e(B \e$(7"A\e(B \e$(7"B\e(B \e$(7"C\e(B \e$(7"D\e(B \e$(7"E\e(B \e$(7"F\e(B \e$(7"G\e(B \e$(7"H\e(B \e$(7"I\e(B \e$(7"J\e(B \e$(7"K\e(B \e$(7"L\e(B \e$(7"M\e(B \e$(7"N\e(B \e$(7"O\e(B ; Vowel signs.
60;;;2250 \e$(7"P\e(B \e$(7"Q\e(B \e$(7"R\e(B \e$(7"S\e(B \e$(7"T\e(B \e$(7"U\e(B \e$(7"V\e(B \e$(7"W\e(B \e$(7"X\e(B \e$(7"Y\e(B \e$(7"Z\e(B \e$(7"[\e(B \e$(7"\\e(B \e$(7"]\e(B \e$(7"^\e(B \e$(7"_\e(B ; (\x2251 = vowel a)
61;;;2260 \e$(7"`\e(B \e$(7"a\e(B \e$(7"b\e(B \e$(7"c\e(B \e$(7"d\e(B \e$(7"e\e(B \e$(7"f\e(B \e$(7"g\e(B \e$(7"h\e(B \e$(7"i\e(B \e$(7"j\e(B \e$(7"k\e(B \e$(7"l\e(B \e$(7"m\e(B \e$(7"n\e(B \e$(7"o\e(B ; Long vowels and
ab3f4890
KH
62;;;2270 \e$(7"p\e(B \e$(7"q\e(B \e$(7"r\e(B \e$(7"s\e(B \e$(7"t\e(B \e$(7"u\e(B \e$(7"v\e(B \e$(7"w\e(B \e$(7"x\e(B \e$(7"y\e(B \e$(7"z\e(B \e$(7"{\e(B \e$(7"|\e(B \e$(7"}\e(B \e$(7"~\e(B // ; vocalic r, l ARE
63;;; ; atomically
a1506d29 64;;; ; encoded.
80d75b56
KH
65;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
66;;;2320 // \e$(7#!\e(B \e$(7#"\e(B \e$(7##\e(B \e$(7#$\e(B \e$(7#%\e(B \e$(7#&\e(B \e$(7#'\e(B \e$(7#(\e(B \e$(7#)\e(B \e$(7#*\e(B \e$(7#+\e(B \e$(7#,\e(B \e$(7#-\e(B \e$(7#.\e(B \e$(7#/\e(B ; Subjoined consonants
67;;;2330 \e$(7#0\e(B \e$(7#1\e(B \e$(7#2\e(B \e$(7#3\e(B \e$(7#4\e(B \e$(7#5\e(B \e$(7#6\e(B \e$(7#7\e(B \e$(7#8\e(B \e$(7#9\e(B \e$(7#:\e(B \e$(7#;\e(B \e$(7#<\e(B \e$(7#=\e(B \e$(7#>\e(B \e$(7#?\e(B ;
ab3f4890 68;;;2340 \e$(7#@\e(B \e$(7#A\e(B \e$(7#B\e(B \e$(7#C\e(B \e$(7#D\e(B \e$(7#E\e(B \e$(7#F\e(B \e$(7#G\e(B \e$(7#H\e(B \e$(7#I\e(B \e$(7#J\e(B \e$(7#K\e(B \e$(7#L\e(B \e$(7#M\e(B \e$(7#N\e(B \e$(7#O\e(B ;
80d75b56
KH
69;;;2350 \e$(7#P\e(B \e$(7#Q\e(B \e$(7#R\e(B \e$(7#S\e(B \e$(7#T\e(B \e$(7#U\e(B \e$(7#V\e(B \e$(7#W\e(B \e$(7#X\e(B \e$(7#Y\e(B \e$(7#Z\e(B \e$(7#[\e(B \e$(7#\\e(B \e$(7#]\e(B \e$(7#^\e(B \e$(7#_\e(B ; Hereafter, the chars
70;;;2360 \e$(7#`\e(B \e$(7#a\e(B \e$(7#b\e(B \e$(7#c\e(B \e$(7#d\e(B \e$(7#e\e(B \e$(7#f\e(B \e$(7#g\e(B \e$(7#h\e(B \e$(7#i\e(B \e$(7#j\e(B \e$(7#k\e(B \e$(7#l\e(B \e$(7#m\e(B \e$(7#n\e(B \e$(7#o\e(B ; are not specified
71;;;2370 \e$(7#p\e(B \e$(7#q\e(B \e$(7#r\e(B \e$(7#s\e(B \e$(7#t\e(B \e$(7#u\e(B \e$(7#v\e(B \e$(7#w\e(B \e$(7#x\e(B \e$(7#y\e(B \e$(7#z\e(B \e$(7#{\e(B \e$(7#|\e(B \e$(7#}\e(B \e$(7#~\e(B // ; in Unicode.
ab3f4890 72;;;
80d75b56
KH
73;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
74;;;2420 // \e$(7$!\e(B \e$(7$"\e(B \e$(7$#\e(B \e$(7$$\e(B \e$(7$%\e(B \e$(7$&\e(B \e$(7$'\e(B \e$(7$(\e(B \e$(7$)\e(B \e$(7$*\e(B \e$(7$+\e(B \e$(7$,\e(B \e$(7$-\e(B \e$(7$.\e(B \e$(7$/\e(B ; Precomposed
75;;;2430 \e$(7$0\e(B \e$(7$1\e(B \e$(7$2\e(B \e$(7$3\e(B \e$(7$4\e(B \e$(7$5\e(B \e$(7$6\e(B \e$(7$7\e(B \e$(7$8\e(B \e$(7$9\e(B \e$(7$:\e(B \e$(7$;\e(B \e$(7$<\e(B \e$(7$=\e(B \e$(7$>\e(B \e$(7$?\e(B ; consonants for
76;;;2440 \e$(7$@\e(B \e$(7$A\e(B \e$(7$B\e(B \e$(7$C\e(B \e$(7$D\e(B \e$(7$E\e(B \e$(7$F\e(B \e$(7$G\e(B \e$(7$H\e(B \e$(7$I\e(B \e$(7$J\e(B \e$(7$K\e(B \e$(7$L\e(B \e$(7$M\e(B \e$(7$N\e(B \e$(7$O\e(B ; ordinary Tibetan.
77;;;2450 \e$(7$P\e(B \e$(7$Q\e(B \e$(7$R\e(B \e$(7$S\e(B \e$(7$T\e(B \e$(7$U\e(B \e$(7$V\e(B \e$(7$W\e(B \e$(7$X\e(B \e$(7$Y\e(B \e$(7$Z\e(B \e$(7$[\e(B \e$(7$\\e(B \e$(7$]\e(B \e$(7$^\e(B \e$(7$_\e(B ; They are decomposed
a1506d29 78;;;2460 \e$(7$`\e(B \e$(7$a\e(B \e$(7$b\e(B \e$(7$c\e(B \e$(7$d\e(B \e$(7$e\e(B \e$(7$f\e(B \e$(7$g\e(B \e$(7$h\e(B \e$(7$i\e(B \e$(7$j\e(B \e$(7$k\e(B \e$(7$l\e(B \e$(7$m\e(B \e$(7$n\e(B \e$(7$o\e(B ; into base and
80d75b56
KH
79;;;2470 \e$(7$p\e(B \e$(7$q\e(B \e$(7$r\e(B \e$(7$s\e(B \e$(7$t\e(B \e$(7$u\e(B \e$(7$v\e(B \e$(7$w\e(B \e$(7$x\e(B \e$(7$y\e(B \e$(7$z\e(B \e$(7${\e(B \e$(7$|\e(B \e$(7$}\e(B \e$(7$~\e(B // ; subjoined consonants
80;;; ; when written on a
81;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan
82;;;2520 // \e$(7%!\e(B \e$(7%"\e(B \e$(7%#\e(B \e$(7%$\e(B \e$(7%%\e(B \e$(7%&\e(B \e$(7%'\e(B \e$(7%(\e(B \e$(7%)\e(B \e$(7%*\e(B \e$(7%+\e(B \e$(7%,\e(B \e$(7%-\e(B \e$(7%.\e(B \e$(7%/\e(B ; coding system.
83;;;2530 \e$(7%0\e(B \e$(7%1\e(B \e$(7%2\e(B \e$(7%3\e(B \e$(7%4\e(B \e$(7%5\e(B \e$(7%6\e(B \e$(7%7\e(B \e$(7%8\e(B \e$(7%9\e(B \e$(7%:\e(B \e$(7%;\e(B \e$(7%<\e(B \e$(7%=\e(B \e$(7%>\e(B \e$(7%?\e(B ;
84;;;2540 \e$(7%@\e(B \e$(7%A\e(B \e$(7%B\e(B \e$(7%C\e(B \e$(7%D\e(B \e$(7%E\e(B \e$(7%F\e(B \e$(7%G\e(B \e$(7%H\e(B \e$(7%I\e(B \e$(7%J\e(B \e$(7%K\e(B \e$(7%L\e(B \e$(7%M\e(B \e$(7%N\e(B \e$(7%O\e(B ;
85;;;2550 \e$(7%P\e(B \e$(7%Q\e(B \e$(7%R\e(B \e$(7%S\e(B \e$(7%T\e(B \e$(7%U\e(B \e$(7%V\e(B \e$(7%W\e(B \e$(7%X\e(B \e$(7%Y\e(B \e$(7%Z\e(B \e$(7%[\e(B \e$(7%\\e(B \e$(7%]\e(B \e$(7%^\e(B \e$(7%_\e(B ;
86;;;2560 \e$(7%`\e(B \e$(7%a\e(B \e$(7%b\e(B \e$(7%c\e(B \e$(7%d\e(B \e$(7%e\e(B \e$(7%f\e(B \e$(7%g\e(B \e$(7%h\e(B \e$(7%i\e(B \e$(7%j\e(B \e$(7%k\e(B \e$(7%l\e(B \e$(7%m\e(B \e$(7%n\e(B \e$(7%o\e(B ;
87;;;2570 \e$(7%p\e(B \e$(7%q\e(B \e$(7%r\e(B \e$(7%s\e(B \e$(7%t\e(B \e$(7%u\e(B \e$(7%v\e(B \e$(7%w\e(B \e$(7%x\e(B \e$(7%y\e(B \e$(7%z\e(B \e$(7%{\e(B \e$(7%|\e(B \e$(7%}\e(B \e$(7%~\e(B // ;
88;;;
89
90
e1915ab3
KH
91(define-coding-system 'tibetan-iso-8bit
92 "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
93 :coding-type 'iso-2022
94 :mnemonic ?Q
95 :designation [ascii tibetan nil nil]
96 :charset-list '(ascii tibetan))
80d75b56 97
a79a3c79 98(define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
80d75b56 99
80d75b56 100(set-language-info-alist
a564ccf9 101 "Tibetan" '((charset tibetan tibetan-1-column)
a79a3c79
KH
102 (coding-system tibetan-iso-8bit)
103 (coding-priority iso-2022-7bit tibetan-iso-8bit)
a564ccf9
KH
104 (input-method . "tibetan-wylie")
105 (features tibet-util)
80d75b56 106 (documentation . t)
8f924df7 107 (sample-text "Tibetan (\e$(7"7"]"2!;"G#!"Q"2!;\e(B) \e$(7!4!5!5!>"7"!#C"Q!;"E"S"G!;"7"2"[!;"D"["#"G!>"I"]"_!;"9"Q!;"/"S!;"5"Q"2#9"[!;"H"A"U"c!>\e(B")))
80d75b56 108
d169c89e
KH
109;; `\e$(7"A\e(B' is included in the pattern for subjoined consonants because we
110;; treat it specially in tibetan-add-components.
ab3f4890 111;; modified by Tomabechi 1999/12/10
3e799ba1
KH
112;; modified by Tomabechi 2000/06/08
113;; To allow infinite addition of vowels/modifiers
114;; as specified in Unicode v.3
115;; \e$(7"A\e(B is removed from the class of subjoined. Tomabechi 2000/06/08
116;; (for Unicode support)
d169c89e 117(defconst tibetan-composable-pattern
8f924df7 118 "[\e$(7"!\e(B-\e$(7"J"K\e(B][\e$(7#!\e(B-\e$(7#J#K#L#M\e(B]*[\e$,1FP\e$(7"Q"R"S\e(B-\e$(7"^"a"b"e\e(B]*[\e$(7"_"c"d"g\e(B-\e$(7"l!I!e!g\e(B]*"
d169c89e
KH
119 "Regexp matching a composable sequence of Tibetan characters.")
120
80d75b56
KH
121;;;
122;;; Definitions of conversion data.
123;;;
124
125
126;;; alists for tibetan char <-> transcription conversion
127;;; longer transcription should come first
128(defconst tibetan-consonant-transcription-alist
129 '(("tsh" . "\e$(7";\e(B")
130 ("dzh" . "\e$(7"=\e(B")
131 ("kSH" . "\e$(7"J\e(B")
132 ("kh" . "\e$(7""\e(B")
133 ("gh" . "\e$(7"$\e(B")
134 ("ng" . "\e$(7"%\e(B")
135 ("ch" . "\e$(7"'\e(B")
136 ("ny" . "\e$(7"*\e(B")
137 ("TH" . "\e$(7",\e(B")
138 ("DH" . "\e$(7".\e(B")
139 ("th" . "\e$(7"1\e(B")
140 ("dh" . "\e$(7"3\e(B")
141 ("ph" . "\e$(7"6\e(B")
142 ("bh" . "\e$(7"8\e(B")
143 ("ts" . "\e$(7":\e(B")
144 ("dz" . "\e$(7"<\e(B")
145 ("zh" . "\e$(7"?\e(B")
146 ("sh" . "\e$(7"E\e(B")
147 ("SH" . "\e$(7"F\e(B")
148 ("k" . "\e$(7"!\e(B")
149 ("g" . "\e$(7"#\e(B")
150 ("c" . "\e$(7"&\e(B")
151 ("j" . "\e$(7"(\e(B")
152 ("T" . "\e$(7"+\e(B")
153 ("D" . "\e$(7"-\e(B")
154 ("N" . "\e$(7"/\e(B")
155 ("t" . "\e$(7"0\e(B")
156 ("d" . "\e$(7"2\e(B")
157 ("n" . "\e$(7"4\e(B")
158 ("p" . "\e$(7"5\e(B")
159 ("b" . "\e$(7"7\e(B")
160 ("m" . "\e$(7"9\e(B")
161 ("w" . "\e$(7">\e(B")
162 ("z" . "\e$(7"@\e(B")
163 ("'" . "\e$(7"A\e(B")
164 ("y" . "\e$(7"B\e(B")
165 ("r" . "\e$(7"C\e(B")
166 ("l" . "\e$(7"D\e(B")
167 ("s" . "\e$(7"G\e(B")
168 ("h" . "\e$(7"H\e(B")
169 ("H" . "\e$(7"H\e(B")
ab3f4890
KH
170 ("A" . "\e$(7"I\e(B")
171 ;; Added by Tomabechi 1999/12/10
172 ("R" . "\e$(7"K\e(B") ;; fixed form RA
173 ))
80d75b56
KH
174
175
176(defconst tibetan-vowel-transcription-alist
3e799ba1
KH
177 '(
178 ;; Composite Vowels
179 ;; Added by Tomabechi 2000/06/08
180 ("frr" . "\e$(7"X\e(B")
181 ("fll" . "\e$(7"Z\e(B")
182 ("fa" . "\e$(7"R\e(B")
183 ("fi" . "\e$(7"T\e(B")
184 ("fu" . "\e$(7"V\e(B")
185 ("fr" . "\e$(7"W\e(B")
186 ("fl" . "\e$(7"Y\e(B")
187 ("fI" . "\e$(7"b\e(B")
188 ;; Normal Vowels
189 ("ai" . "\e$(7"\\e(B")
80d75b56
KH
190 ("au" . "\e$(7"^\e(B")
191 ("ee" . "\e$(7"\\e(B")
192 ("oo" . "\e$(7"^\e(B")
193 ("a" . "\e$(7"Q\e(B") ; invisible vowel sign (\x2251)
194 ("i" . "\e$(7"S\e(B")
195 ("u" . "\e$(7"U\e(B")
196 ("e" . "\e$(7"[\e(B")
197 ("o" . "\e$(7"]\e(B")
198 ("E" . "\e$(7"\\e(B")
199 ("O" . "\e$(7"^\e(B")
200 ("I" . "\e$(7"a\e(B")
80d75b56 201 ("," . "\e$(7"e\e(B") ; idem.
80d75b56
KH
202 ))
203
d169c89e
KH
204(defconst tibetan-modifier-transcription-alist
205 '(("M" . "\e$(7"_\e(B")
206 ("~" . "\e$(7"c\e(B")
207 ("`" . "\e$(7"d\e(B")
208 ("x" . "\e$(7"i\e(B")
209 ("X" . "\e$(7"j\e(B")
210 ("v" . "\e$(7"g\e(B")
211 ("V" . "\e$(7"h\e(B")
212 ("q" . "\e$(7"k\e(B")
213 ("Q" . "\e$(7"l\e(B")
214 ("_/" . "\e$(7!I\e(B")
215 ("_o" . "\e$(7!g\e(B")
216 ("_O" . "\e$(7!e\e(B")))
217
80d75b56
KH
218(defconst tibetan-precomposed-transcription-alist
219 '(("phyw" . "\e$(7$G\e(B")
220 ("tshw" . "\e$(7$)\e(B")
221 ("rtsw" . "\e$(7%.\e(B")
222 ("khw" . "\e$(7$"\e(B")
223 ("nyw" . "\e$(7$%\e(B")
224 ("tsw" . "\e$(7$(\e(B")
225 ("zhw" . "\e$(7$*\e(B")
226 ("shw" . "\e$(7$.\e(B")
227 ("khy" . "\e$(7$A\e(B")
228 ("phy" . "\e$(7$D\e(B")
229 ("khr" . "\e$(7$Q\e(B")
230 ("thr" . "\e$(7$T\e(B")
231 ("phr" . "\e$(7$W\e(B")
232 ("shr" . "\e$(7$Z\e(B")
233 ("dzr" . "\e$(7$^\e(B")
234 ("grw" . "\e$(7$_\e(B")
235 ("rng" . "\e$(7%#\e(B")
236 ("rny" . "\e$(7%%\e(B")
237 ("rts" . "\e$(7%+\e(B")
238 ("rdz" . "\e$(7%,\e(B")
239 ("rgw" . "\e$(7%-\e(B")
240 ("rky" . "\e$(7%0\e(B")
241 ("rgy" . "\e$(7%1\e(B")
242 ("rmy" . "\e$(7%2\e(B")
243 ("lng" . "\e$(7%B\e(B")
244 ("sng" . "\e$(7%R\e(B")
245 ("sny" . "\e$(7%S\e(B")
246 ("sts" . "\e$(7%Z\e(B")
247 ("sky" . "\e$(7%`\e(B")
248 ("sgy" . "\e$(7%a\e(B")
249 ("spy" . "\e$(7%b\e(B")
250 ("sby" . "\e$(7%c\e(B")
251 ("smy" . "\e$(7%d\e(B")
252 ("skr" . "\e$(7%p\e(B")
253 ("sgr" . "\e$(7%q\e(B")
254 ("snr" . "\e$(7%r\e(B")
255 ("spr" . "\e$(7%s\e(B")
256 ("sbr" . "\e$(7%t\e(B")
257 ("smr" . "\e$(7%u\e(B")
258 ("kw" . "\e$(7$!\e(B")
259 ("gw" . "\e$(7$#\e(B")
260 ("cw" . "\e$(7$$\e(B")
261 ("tw" . "\e$(7$&\e(B")
262 ("dw" . "\e$(7$'\e(B")
263 ("zw" . "\e$(7$+\e(B")
264 ("rw" . "\e$(7$,\e(B")
265 ("lw" . "\e$(7$-\e(B")
266 ("sw" . "\e$(7$/\e(B")
267 ("hw" . "\e$(7$0\e(B")
268 ("ky" . "\e$(7$@\e(B")
269 ("gy" . "\e$(7$B\e(B")
270 ("py" . "\e$(7$C\e(B")
271 ("by" . "\e$(7$E\e(B")
272 ("my" . "\e$(7$F\e(B")
273 ("kr" . "\e$(7$P\e(B")
274 ("gr" . "\e$(7$R\e(B")
275 ("tr" . "\e$(7$S\e(B")
276 ("dr" . "\e$(7$U\e(B")
277 ("pr" . "\e$(7$V\e(B")
278 ("brk" . "\e$(7"7%!\e(B")
279 ("brg" . "\e$(7"7%"\e(B")
280 ("brng" . "\e$(7"7%#\e(B")
281 ("brj" . "\e$(7"7%$\e(B")
282 ("brny" . "\e$(7"7%%\e(B")
ab3f4890 283 ("brt" . "\e$(7"7%&\e(B")
80d75b56
KH
284 ("brd" . "\e$(7"7%'\e(B")
285 ("brn" . "\e$(7"7%(\e(B")
286 ("brts" . "\e$(7"7%+\e(B")
287 ("brdz" . "\e$(7"7%,\e(B")
288 ("brl" . "\e$(7"7$d\e(B")
289 ("br" . "\e$(7$X\e(B")
290 ("mr" . "\e$(7$Y\e(B")
291 ("sr" . "\e$(7$[\e(B")
292 ("hr" . "\e$(7$\\e(B")
293 ("jr" . "\e$(7$]\e(B")
294 ("kl" . "\e$(7$`\e(B")
295 ("gl" . "\e$(7$a\e(B")
296 ("blt" . "\e$(7"7%E\e(B")
297 ("bld" . "\e$(7"7%F\e(B")
298 ("bl" . "\e$(7$b\e(B")
299 ("zl" . "\e$(7$c\e(B")
300 ("rl" . "\e$(7$d\e(B")
301 ("sl" . "\e$(7$e\e(B")
302 ("rk" . "\e$(7%!\e(B")
303 ("rg" . "\e$(7%"\e(B")
304 ("rj" . "\e$(7%$\e(B")
305 ("rt" . "\e$(7%&\e(B")
306 ("rd" . "\e$(7%'\e(B")
307 ("rn" . "\e$(7%(\e(B")
308 ("rb" . "\e$(7%)\e(B")
309 ("rm" . "\e$(7%*\e(B")
310 ("lk" . "\e$(7%@\e(B")
311 ("lg" . "\e$(7%A\e(B")
312 ("lc" . "\e$(7%C\e(B")
313 ("lj" . "\e$(7%D\e(B")
314 ("lt" . "\e$(7%E\e(B")
315 ("ld" . "\e$(7%F\e(B")
316 ("ln" . "\e$(7!!\e(B") ; dummy \x2121
317 ("lp" . "\e$(7%G\e(B")
318 ("lb" . "\e$(7%H\e(B")
319 ("lh" . "\e$(7%I\e(B")
320 ("sk" . "\e$(7%P\e(B")
321 ("sg" . "\e$(7%Q\e(B")
322 ("st" . "\e$(7%T\e(B")
323 ("sd" . "\e$(7%U\e(B")
324 ("sn" . "\e$(7%V\e(B")
325 ("sp" . "\e$(7%W\e(B")
326 ("sb" . "\e$(7%X\e(B")
ab3f4890
KH
327 ("sm" . "\e$(7%Y\e(B"))
328 )
329
80d75b56
KH
330
331(defconst tibetan-subjoined-transcription-alist
d169c89e
KH
332 (sort '(("+k" . "\e$(7#!\e(B")
333 ("+kh" . "\e$(7#"\e(B")
334 ("+g" . "\e$(7##\e(B")
335 ("+gh" . "\e$(7#$\e(B")
336 ("+ng" . "\e$(7#%\e(B")
337 ("+c" . "\e$(7#&\e(B")
338 ("+ch" . "\e$(7#'\e(B")
339 ("+j" . "\e$(7#(\e(B")
340 ("+ny" . "\e$(7#*\e(B")
341 ("+T" . "\e$(7#+\e(B")
342 ("+TH" . "\e$(7#,\e(B")
343 ("+D" . "\e$(7#-\e(B")
344 ("+DH" . "\e$(7#.\e(B")
345 ("+N" . "\e$(7#/\e(B")
346 ("+t" . "\e$(7#0\e(B")
347 ("+th" . "\e$(7#1\e(B")
348 ("+d" . "\e$(7#2\e(B")
349 ("+dh" . "\e$(7#3\e(B")
350 ("+n" . "\e$(7#4\e(B")
351 ("+p" . "\e$(7#5\e(B")
352 ("+ph" . "\e$(7#6\e(B")
353 ("+b" . "\e$(7#7\e(B")
354 ("+bh" . "\e$(7#8\e(B")
355 ("+m" . "\e$(7#9\e(B")
356 ("+ts" . "\e$(7#:\e(B")
357 ("+tsh" . "\e$(7#;\e(B")
358 ("+dz" . "\e$(7#<\e(B")
359 ("+dzh" . "\e$(7#=\e(B")
360 ("+w" . "\e$(7#>\e(B")
361 ("+zh" . "\e$(7#?\e(B")
362 ("+z" . "\e$(7#@\e(B")
363 ("+'" . "\e$(7#A\e(B")
364 ("+y" . "\e$(7#B\e(B")
365 ("+r" . "\e$(7#C\e(B")
366 ("+l" . "\e$(7#D\e(B")
367 ("+sh" . "\e$(7#E\e(B")
368 ("+SH" . "\e$(7#F\e(B")
369 ("+s" . "\e$(7#G\e(B")
370 ("+h" . "\e$(7#H\e(B")
371 ("+A" . "\e$(7#I\e(B")
372 ("+kSH" . "\e$(7#J\e(B")
ab3f4890
KH
373 ;; Added by Tomabechi 1999/12/10
374 ("+W" . "\e$(7#K\e(B") ;; fixed form subscribed WA
375 ("+Y" . "\e$(7#L\e(B") ;; fixed form subscribed YA
376 ("+R" . "\e$(7#M\e(B") ;; fixed form subscribed RA
377 )
d169c89e 378 (lambda (x y) (> (length (car x)) (length (car y))))))
80d75b56
KH
379
380;;;
381;;; alist for Tibetan base consonant <-> subjoined consonant conversion.
382;;;
383(defconst tibetan-base-to-subjoined-alist
384 '(("\e$(7"!\e(B" . "\e$(7#!\e(B")
385 ("\e$(7""\e(B" . "\e$(7#"\e(B")
386 ("\e$(7"#\e(B" . "\e$(7##\e(B")
387 ("\e$(7"$\e(B" . "\e$(7#$\e(B")
388 ("\e$(7"%\e(B" . "\e$(7#%\e(B")
389 ("\e$(7"&\e(B" . "\e$(7#&\e(B")
390 ("\e$(7"'\e(B" . "\e$(7#'\e(B")
391 ("\e$(7"(\e(B" . "\e$(7#(\e(B")
392 ("\e$(7"*\e(B" . "\e$(7#*\e(B")
393 ("\e$(7"+\e(B" . "\e$(7#+\e(B")
394 ("\e$(7",\e(B" . "\e$(7#,\e(B")
395 ("\e$(7"-\e(B" . "\e$(7#-\e(B")
396 ("\e$(7".\e(B" . "\e$(7#.\e(B")
397 ("\e$(7"/\e(B" . "\e$(7#/\e(B")
398 ("\e$(7"0\e(B" . "\e$(7#0\e(B")
399 ("\e$(7"1\e(B" . "\e$(7#1\e(B")
400 ("\e$(7"2\e(B" . "\e$(7#2\e(B")
401 ("\e$(7"3\e(B" . "\e$(7#3\e(B")
402 ("\e$(7"4\e(B" . "\e$(7#4\e(B")
403 ("\e$(7"5\e(B" . "\e$(7#5\e(B")
404 ("\e$(7"6\e(B" . "\e$(7#6\e(B")
405 ("\e$(7"7\e(B" . "\e$(7#7\e(B")
406 ("\e$(7"8\e(B" . "\e$(7#8\e(B")
407 ("\e$(7"9\e(B" . "\e$(7#9\e(B")
408 ("\e$(7":\e(B" . "\e$(7#:\e(B")
409 ("\e$(7";\e(B" . "\e$(7#;\e(B")
410 ("\e$(7"<\e(B" . "\e$(7#<\e(B")
411 ("\e$(7"=\e(B" . "\e$(7#=\e(B")
412 ("\e$(7">\e(B" . "\e$(7#>\e(B")
413 ("\e$(7"?\e(B" . "\e$(7#?\e(B")
414 ("\e$(7"@\e(B" . "\e$(7#@\e(B")
415 ("\e$(7"A\e(B" . "\e$(7#A\e(B")
416 ("\e$(7"B\e(B" . "\e$(7#B\e(B")
417 ("\e$(7"C\e(B" . "\e$(7#C\e(B")
418 ("\e$(7"D\e(B" . "\e$(7#D\e(B")
419 ("\e$(7"E\e(B" . "\e$(7#E\e(B")
420 ("\e$(7"F\e(B" . "\e$(7#F\e(B")
421 ("\e$(7"G\e(B" . "\e$(7#G\e(B")
422 ("\e$(7"H\e(B" . "\e$(7#H\e(B")
423 ("\e$(7"I\e(B" . "\e$(7#I\e(B")
ab3f4890
KH
424 ("\e$(7"J\e(B" . "\e$(7#J\e(B")
425 ;; Added by Tomabechi 1999/12/10
426 ("\e$(7"K\e(B" . "\e$(7#M\e(B") ;; Fixed form RA (224B->234D)
427 ))
3e799ba1
KH
428
429;;; alist for Tibetan composite vowels (long i, vocalic r, etc.)
430;;; New varialble. created by Tomabechi 2000/06/08
431(defconst tibetan-composite-vowel-alist
432 '(;; LONG A
433 ;; ("\e$(7"R\e(B" . ((bc . tc) ?\e$(7"R\e(B))
434 ;; LONG I
435 ("\e$(7"T\e(B" . (?\e$(7"R\e(B (tc . bc) ?\e$(7"S\e(B))
436 ;; LONG U
437 ("\e$(7"V\e(B" . (?\e$(7"R\e(B (bc . tc) ?\e$(7"U\e(B))
438 ;; VOCALIC R
439 ("\e$(7"W\e(B" . (?\e$(7#C\e(B (tc . bc) ?\e$(7"a\e(B))
440 ;; LONG VOCALIC R
441 ("\e$(7"X\e(B" . (?\e$(7#C\e(B (bc . tc) ?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
442 ;; VOCALIC L
443 ("\e$(7"Y\e(B" . (?\e$(7#D\e(B (tc . bc) ?\e$(7"a\e(B))
444 ;;\e$(7!;\e(BLONG VOCALIC L
445 ("\e$(7"Z\e(B" . (?\e$(7#D\e(B (bc . tc) ?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
446 ;; LONG REVERSE I
447 ("\e$(7"b\e(B" . (?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
448 ))
449
450
451
80d75b56
KH
452;;;
453;;; alist for Tibetan consonantic components <-> precomposed glyph conversion.
454;;; (includes some punctuation conversion rules)
455;;;
456(defconst tibetan-precomposition-rule-alist
d169c89e 457 `(("\e$(7"6#B#>\e(B" . "\e$(7$G\e(B")
80d75b56
KH
458 ("\e$(7"##C#>\e(B" . "\e$(7$_\e(B")
459 ("\e$(7";#>\e(B" . "\e$(7$)\e(B")
460 ("\e$(7"C#:#>\e(B" . "\e$(7%.\e(B")
461 ("\e$(7"C###>\e(B" . "\e$(7%-\e(B")
462 ("\e$(7"C#!#B\e(B" . "\e$(7%0\e(B")
463 ("\e$(7"C###B\e(B" . "\e$(7%1\e(B")
464 ("\e$(7"C#9#B\e(B" . "\e$(7%2\e(B")
465 ("\e$(7"G#!#B\e(B" . "\e$(7%`\e(B")
466 ("\e$(7"G###B\e(B" . "\e$(7%a\e(B")
467 ("\e$(7"G#5#B\e(B" . "\e$(7%b\e(B")
468 ("\e$(7"G#7#B\e(B" . "\e$(7%c\e(B")
469 ("\e$(7"G#9#B\e(B" . "\e$(7%d\e(B")
470 ("\e$(7"G#!#C\e(B" . "\e$(7%p\e(B")
471 ("\e$(7"G###C\e(B" . "\e$(7%q\e(B")
472 ("\e$(7"G#4#C\e(B" . "\e$(7%r\e(B")
473 ("\e$(7"G#5#C\e(B" . "\e$(7%s\e(B")
474 ("\e$(7"G#7#C\e(B" . "\e$(7%t\e(B")
475 ("\e$(7"G#9#C\e(B" . "\e$(7%u\e(B")
476 ("\e$(7""#>\e(B" . "\e$(7$"\e(B")
477 ("\e$(7"*#>\e(B" . "\e$(7$%\e(B")
478 ("\e$(7":#>\e(B" . "\e$(7$(\e(B")
479 ("\e$(7"?#>\e(B" . "\e$(7$*\e(B")
480 ("\e$(7"E#>\e(B" . "\e$(7$.\e(B")
481 ("\e$(7""#B\e(B" . "\e$(7$A\e(B")
482 ("\e$(7"6#B\e(B" . "\e$(7$D\e(B")
483 ("\e$(7""#C\e(B" . "\e$(7$Q\e(B")
484 ("\e$(7"1#C\e(B" . "\e$(7$T\e(B")
485 ("\e$(7"6#C\e(B" . "\e$(7$W\e(B")
486 ("\e$(7"E#C\e(B" . "\e$(7$Z\e(B")
487 ("\e$(7"<#C\e(B" . "\e$(7$^\e(B")
488 ("\e$(7"C#%\e(B" . "\e$(7%#\e(B")
489 ("\e$(7"C#*\e(B" . "\e$(7%%\e(B")
490 ("\e$(7"C#:\e(B" . "\e$(7%+\e(B")
491 ("\e$(7"C#<\e(B" . "\e$(7%,\e(B")
492 ("\e$(7"D#%\e(B" . "\e$(7%B\e(B")
493 ("\e$(7"G#%\e(B" . "\e$(7%R\e(B")
494 ("\e$(7"G#*\e(B" . "\e$(7%S\e(B")
495 ("\e$(7"G#:\e(B" . "\e$(7%Z\e(B")
496 ("\e$(7"!#>\e(B" . "\e$(7$!\e(B")
497 ("\e$(7"##>\e(B" . "\e$(7$#\e(B")
498 ("\e$(7"&#>\e(B" . "\e$(7$$\e(B")
499 ("\e$(7"0#>\e(B" . "\e$(7$&\e(B")
500 ("\e$(7"2#>\e(B" . "\e$(7$'\e(B")
501 ("\e$(7"@#>\e(B" . "\e$(7$+\e(B")
502 ("\e$(7"C#>\e(B" . "\e$(7$,\e(B")
503 ("\e$(7"D#>\e(B" . "\e$(7$-\e(B")
504 ("\e$(7"G#>\e(B" . "\e$(7$/\e(B")
505 ("\e$(7"H#>\e(B" . "\e$(7$0\e(B")
506 ("\e$(7"!#B\e(B" . "\e$(7$@\e(B")
507 ("\e$(7"##B\e(B" . "\e$(7$B\e(B")
508 ("\e$(7"5#B\e(B" . "\e$(7$C\e(B")
509 ("\e$(7"7#B\e(B" . "\e$(7$E\e(B")
510 ("\e$(7"9#B\e(B" . "\e$(7$F\e(B")
511 ("\e$(7"!#C\e(B" . "\e$(7$P\e(B")
512 ("\e$(7"##C\e(B" . "\e$(7$R\e(B")
513 ("\e$(7"0#C\e(B" . "\e$(7$S\e(B")
514 ("\e$(7"2#C\e(B" . "\e$(7$U\e(B")
515 ("\e$(7"5#C\e(B" . "\e$(7$V\e(B")
516 ("\e$(7"7#C\e(B" . "\e$(7$X\e(B")
517 ("\e$(7"9#C\e(B" . "\e$(7$Y\e(B")
518 ("\e$(7"G#C\e(B" . "\e$(7$[\e(B")
519 ("\e$(7"H#C\e(B" . "\e$(7$\\e(B")
520 ("\e$(7"(#C\e(B" . "\e$(7$]\e(B")
521 ("\e$(7"!#D\e(B" . "\e$(7$`\e(B")
522 ("\e$(7"##D\e(B" . "\e$(7$a\e(B")
523 ("\e$(7"7#D\e(B" . "\e$(7$b\e(B")
524 ("\e$(7"@#D\e(B" . "\e$(7$c\e(B")
525 ("\e$(7"C#D\e(B" . "\e$(7$d\e(B")
526 ("\e$(7"G#D\e(B" . "\e$(7$e\e(B")
527 ("\e$(7"C#!\e(B" . "\e$(7%!\e(B")
528 ("\e$(7"C##\e(B" . "\e$(7%"\e(B")
529 ("\e$(7"C#(\e(B" . "\e$(7%$\e(B")
530 ("\e$(7"C#0\e(B" . "\e$(7%&\e(B")
531 ("\e$(7"C#2\e(B" . "\e$(7%'\e(B")
532 ("\e$(7"C#4\e(B" . "\e$(7%(\e(B")
533 ("\e$(7"C#7\e(B" . "\e$(7%)\e(B")
534 ("\e$(7"C#9\e(B" . "\e$(7%*\e(B")
535 ("\e$(7"D#!\e(B" . "\e$(7%@\e(B")
536 ("\e$(7"D##\e(B" . "\e$(7%A\e(B")
3e799ba1 537 ("\e$(7"D#4\e(B" . "\e$(7!!\e(B") ; dummy 0x2121 added 2000/06/08 for transition l -> lng
80d75b56
KH
538 ("\e$(7"D#&\e(B" . "\e$(7%C\e(B")
539 ("\e$(7"D#(\e(B" . "\e$(7%D\e(B")
540 ("\e$(7"D#0\e(B" . "\e$(7%E\e(B")
541 ("\e$(7"D#2\e(B" . "\e$(7%F\e(B")
542 ("\e$(7"D#5\e(B" . "\e$(7%G\e(B")
543 ("\e$(7"D#7\e(B" . "\e$(7%H\e(B")
544 ("\e$(7"D#H\e(B" . "\e$(7%I\e(B")
545 ("\e$(7"G#!\e(B" . "\e$(7%P\e(B")
546 ("\e$(7"G##\e(B" . "\e$(7%Q\e(B")
547 ("\e$(7"G#0\e(B" . "\e$(7%T\e(B")
548 ("\e$(7"G#2\e(B" . "\e$(7%U\e(B")
549 ("\e$(7"G#4\e(B" . "\e$(7%V\e(B")
550 ("\e$(7"G#5\e(B" . "\e$(7%W\e(B")
551 ("\e$(7"G#7\e(B" . "\e$(7%X\e(B")
d169c89e
KH
552 ("\e$(7"G#9\e(B" . "\e$(7%Y\e(B")))
553
d169c89e
KH
554(defconst tibetan-regexp
555 (let ((l (list tibetan-precomposed-transcription-alist
556 tibetan-consonant-transcription-alist
557 tibetan-vowel-transcription-alist
558 tibetan-modifier-transcription-alist
559 tibetan-subjoined-transcription-alist))
560 (separator "\\|")
561 tail pattern)
80d75b56 562 (while l
d169c89e
KH
563 (setq tail (car l) l (cdr l))
564 (while tail
565 (setq pattern (cons separator (cons (car (car tail)) pattern))
566 tail (cdr tail))))
567 (apply 'concat (nreverse (cdr pattern))))
568 "Regexp matching a Tibetan transcription of a composable Tibetan sequence.
569The result of matching is to be used for indexing alists at conversion
570from a roman transcription to the corresponding Tibetan character.")
80d75b56
KH
571
572(defvar tibetan-precomposed-regexp
573 (let ((l tibetan-precomposed-transcription-alist)
574 temp)
575 (setq temp "^\\(")
576 (setq temp
577 (concat temp (car (car l))))
578 (setq l (cdr l))
579 (while l
580 (setq temp
581 (concat temp "\\|" (car (car l))))
582 (setq l (cdr l)))
583 (concat temp "\\)"))
584 "Regexp string to match a romanized Tibetan complex consonant.
585The result of matching is to be used for indexing alists when the input key
586from an input method is converted to the corresponding precomposed glyph.")
587
588(defvar tibetan-precomposition-rule-regexp
589 (let ((l tibetan-precomposition-rule-alist)
590 temp)
591 (setq temp "\\(")
592 (setq temp (concat temp (car (car l))))
593 (setq l (cdr l))
594 (while l
595 (setq temp (concat temp "\\|" (car (car l))))
596 (setq l (cdr l)))
597 (concat temp "\\)"))
598 "Regexp string to match a sequence of Tibetan consonantic components, i.e.,
599one base consonant and one or more subjoined consonants.
600The result of matching is to be used for indexing alist when the component
601sequence is converted to the corresponding precomposed glyph.
602This also matches some punctuation characters which need conversion.")
603
604(defvar tibetan-decomposed nil)
605(defvar tibetan-decomposed-temp nil)
606
69d21b0c 607;; For automatic composition.
16a4c7e9 608(set-char-table-range composition-function-table '(#xF00 . #xFD1)
afc3e744 609 '(("[\xF00-\xFD1]+" . font-shape-text)))
69d21b0c 610
41da80b1
DL
611(provide 'tibetan)
612
6b61353c 613;;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7
e8af40ee 614;;; tibetan.el ends here