Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / lisp / mule / ethiopic.el
1 ;;; ethiopic.el --- Support for Ethiopic -*- coding: iso-2022-7bit; -*-
2
3 ;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
6
7 ;; Keywords: multilingual, Ethiopic
8
9 ;; This file is part of XEmacs.
10
11 ;; XEmacs is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; XEmacs is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING.  If not, write to the Free
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 ;; 02111-1307, USA.
25
26 ;; Author: TAKAHASHI Naoto <ntakahas@etl.go.jp>
27 ;;         modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> for XEmacs.
28
29 ;;; Code:
30
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 ;;; ETHIOPIC
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34
35 (define-category ?E "Ethiopic (Ge'ez) character.")
36 (modify-category-entry 'ethiopic ?E)
37 \f
38 (define-ccl-program ccl-encode-ethio-font
39   '(0
40     ;; In:  R0:ethiopic (not checked)
41     ;;      R1:position code 1
42     ;;      R2:position code 2
43     ;; Out: R1:font code point 1
44     ;;      R2:font code point 2
45     ((r1 -= 33)
46      (r2 -= 33)
47      (r1 *= 94)
48      (r2 += r1)
49      (if (r2 < 256)
50          (r1 = ?\x12)
51        (if (r2 < 448)
52            ((r1 = ?\x13) (r2 -= 256))
53          ((r1 = ?\xfd) (r2 -= 208))
54          ))))
55   "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
56
57 ;; (setq font-ccl-encoder-alist
58 ;;       (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist))
59 (set-charset-ccl-program 'ethiopic 'ccl-encode-ethio-font)
60
61 (set-language-info-alist
62  "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
63               (exit-function . exit-ethiopic-environment)
64               (charset ethiopic)
65               (coding-system iso-2022-7bit)
66               (coding-priority iso-2022-7bit)
67               (input-method . "ethiopic")
68               (features ethio-util)
69               (sample-text . "\e$(3$Q#U!.\e(B")
70               (documentation . t)))
71
72 ;;; ethiopic.el ends here