29 |
|
|
30 |
;;; Code: |
;;; Code: |
31 |
|
|
32 |
(make-coding-system |
(define-coding-system 'in-is13194-devanagari |
33 |
'in-is13194 2 ?D |
"8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)." |
34 |
"8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)." |
:coding-type 'iso-2022 |
35 |
'(ascii indian-is13194 nil nil |
:mnemonic ?D |
36 |
nil ascii-eol) |
:designation [ascii indian-is13194 nil nil] |
37 |
`((safe-chars . ,(let ((table (make-char-table 'safe-chars nil))) |
:charset-list '(ascii indian-is13194) |
38 |
(set-char-table-range table 'indian-is13194 t) |
:post-read-conversion 'in-is13194-post-read-conversion |
39 |
(dotimes (i 127) |
:pre-write-conversion 'in-is13194-pre-write-conversion) |
|
(aset table i t) |
|
|
(aset table (decode-char 'ucs (+ #x900 i)) t)) |
|
|
table)) |
|
|
(post-read-conversion . in-is13194-post-read-conversion) |
|
|
(pre-write-conversion . in-is13194-pre-write-conversion))) |
|
40 |
|
|
41 |
(define-coding-system-alias 'devanagari 'in-is13194) |
(define-coding-system-alias 'devanagari 'in-is13194-devanagari) |
42 |
|
|
43 |
(defvar indian-font-foundry 'cdac |
(defvar indian-font-foundry 'cdac |
44 |
"Font foundry for Indian characters. |
"Font foundry for Indian characters. |
151 |
to one of `indian-script-table' (which see). |
to one of `indian-script-table' (which see). |
152 |
The default value is `devanagari'.") |
The default value is `devanagari'.") |
153 |
|
|
154 |
(define-ccl-program ccl-encode-indian-glyph-font |
(defvar indian-composable-pattern |
155 |
`(0 |
(make-char-table nil) |
156 |
;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256)) |
"Char table of regexps for composable Indian character sequence.") |
|
(r1 = ((((r1 * 96) + r2) - ,(+ (* 32 96) 32)) % 256)))) |
|
|
|
|
|
(setq font-ccl-encoder-alist |
|
|
(cons (cons "-CDAC" 'ccl-encode-indian-glyph-font) |
|
|
font-ccl-encoder-alist)) |
|
|
|
|
|
(setq font-ccl-encoder-alist |
|
|
(cons (cons "-AKRUTI" 'ccl-encode-indian-glyph-font) |
|
|
font-ccl-encoder-alist)) |
|
157 |
|
|
158 |
(provide 'indian) |
(provide 'indian) |
159 |
|
|