Commit | Line | Data |
---|---|---|
1bec6fdb | 1 | ;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
1bec6fdb | 3 | ;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. |
4ed46869 | 4 | |
1bec6fdb RS |
5 | ;; Maintainer: KAWABATA, Taichi <batta@beige.ocn.ne.jp> |
6 | ;; Keywords: multilingual, Indian | |
4ed46869 KH |
7 | |
8 | ;; This file is part of GNU Emacs. | |
9 | ||
10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 | ;; it under the terms of the GNU General Public License as published by | |
12 | ;; the Free Software Foundation; either version 2, or (at your option) | |
13 | ;; any later version. | |
14 | ||
15 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;; GNU General Public License for more details. | |
19 | ||
20 | ;; You should have received a copy of the GNU General Public License | |
e803d6bd KH |
21 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | ;; Boston, MA 02111-1307, USA. | |
4ed46869 KH |
24 | |
25 | ;;; Commentary: | |
26 | ||
1bec6fdb RS |
27 | ;; This file defines in-is13194 coding system and relationship between |
28 | ;; indian-glyph character-set and various CDAC fonts. | |
4ed46869 KH |
29 | |
30 | ;;; Code: | |
31 | ||
1bec6fdb RS |
32 | (make-coding-system |
33 | 'in-is13194 2 ?D | |
5ef35063 | 34 | "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)." |
1bec6fdb RS |
35 | '(ascii indian-is13194 nil nil |
36 | nil ascii-eol) | |
37 | '((safe-charsets ascii indian-is13194) | |
38 | (post-read-conversion . in-is13194-post-read-conversion) | |
39 | (pre-write-conversion . in-is13194-pre-write-conversion))) | |
40 | ||
41 | (defvar indian-script-table | |
42 | '[ | |
43 | devanagari | |
44 | sanskrit | |
45 | bengali | |
46 | tamil | |
47 | telugu | |
48 | assamese | |
49 | oriya | |
50 | kannada | |
51 | malayalam | |
52 | gujarati | |
53 | punjabi | |
54 | ] | |
55 | "Vector of Indian script names.") | |
56 | ||
57 | (let ((len (length indian-script-table)) | |
58 | (i 0)) | |
59 | (while (< i len) | |
60 | (put (aref indian-script-table i) 'indian-glyph-code-offset (* 256 i)) | |
61 | (setq i (1+ i)))) | |
62 | ||
63 | (defvar indian-default-script 'devanagari | |
64 | "Default script for Indian languages. | |
65 | Each Indian language environment sets this value | |
66 | to one of `indian-script-table' (which see). | |
67 | The default value is `devanagari'.") | |
68 | ||
1bec6fdb RS |
69 | (define-ccl-program ccl-encode-indian-glyph-font |
70 | `(0 | |
71 | ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256)) | |
72 | (r1 = ((((r1 * 96) + r2) - ,(+ (* 32 96) 32)) % 256)))) | |
73 | ||
74 | (setq font-ccl-encoder-alist | |
75 | (cons (cons "-CDAC" 'ccl-encode-indian-glyph-font) | |
76 | font-ccl-encoder-alist)) | |
77 | ||
78 | (setq font-ccl-encoder-alist | |
79 | (cons '("ISO10646.*-1" . ccl-encode-unicode-font) | |
80 | font-ccl-encoder-alist)) | |
41da80b1 DL |
81 | |
82 | (provide 'indian) | |
1bec6fdb | 83 | |
4ed46869 | 84 | ;;; indian.el ends here |