353
|
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 ;; Ethiopic
|
|
32 (make-charset 'ethiopic "Ethiopic"
|
|
33 '(registry "Ethio"
|
|
34 dimension 2
|
|
35 chars 94
|
|
36 final ?3
|
|
37 graphic 0
|
|
38 ))
|
|
39
|
|
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
41 ;;; ETHIOPIC
|
|
42 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
43
|
|
44 (define-category ?E "Ethiopic (Ge'ez) character.")
|
|
45 (modify-category-entry 'ethiopic ?E)
|
|
46
|
|
47 (define-ccl-program ccl-encode-ethio-font
|
|
48 '(0
|
|
49 ;; In: R0:ethiopic (not checked)
|
|
50 ;; R1:position code 1
|
|
51 ;; R2:position code 2
|
|
52 ;; Out: R1:font code point 1
|
|
53 ;; R2:font code point 2
|
|
54 ((r1 -= 33)
|
|
55 (r2 -= 33)
|
|
56 (r1 *= 94)
|
|
57 (r2 += r1)
|
|
58 (if (r2 < 256)
|
|
59 (r1 = ?\x12)
|
|
60 (if (r2 < 448)
|
|
61 ((r1 = ?\x13) (r2 -= 256))
|
|
62 ((r1 = ?\xfd) (r2 -= 208))
|
|
63 ))))
|
|
64 "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
|
|
65
|
|
66 ;; (setq font-ccl-encoder-alist
|
|
67 ;; (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist))
|
|
68 (set-charset-ccl-program 'ethiopic ccl-encode-ethio-font)
|
|
69
|
|
70 (set-language-info-alist
|
|
71 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
|
|
72 (exit-function . exit-ethiopic-environment)
|
|
73 (charset ethiopic)
|
|
74 (coding-system iso-2022-7bit)
|
|
75 (coding-priority iso-2022-7bit)
|
|
76 (input-method . "ethiopic")
|
|
77 (features ethio-util)
|
|
78 (sample-text . "$(3$Q#U!.(B")
|
|
79 (documentation . t)))
|
|
80
|
|
81 ;;; ethiopic.el ends here
|