diff options
| author | Dave Love | 2001-12-15 17:55:23 +0000 |
|---|---|---|
| committer | Dave Love | 2001-12-15 17:55:23 +0000 |
| commit | 878c3fe8996e576a5ffa0523fc85f91137edd9cd (patch) | |
| tree | 0c88bbbb0797c9345ed013b9355f459fd89d6f3c | |
| parent | 91c78c93238435b1116d3fa8221216660a4ceb73 (diff) | |
| download | emacs-878c3fe8996e576a5ffa0523fc85f91137edd9cd.tar.gz emacs-878c3fe8996e576a5ffa0523fc85f91137edd9cd.zip | |
(indian-glyph-char, indian-glyph-max-char)
(indian-char-glyph): Moved to ind-util.el
| -rw-r--r-- | lisp/language/indian.el | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lisp/language/indian.el b/lisp/language/indian.el index e637ea94449..74e7b170d57 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el | |||
| @@ -66,40 +66,6 @@ Each Indian language environment sets this value | |||
| 66 | to one of `indian-script-table' (which see). | 66 | to one of `indian-script-table' (which see). |
| 67 | The default value is `devanagari'.") | 67 | The default value is `devanagari'.") |
| 68 | 68 | ||
| 69 | (defun indian-glyph-char (index &optional script) | ||
| 70 | "Return character of charset `indian-glyph' made from glyph index INDEX. | ||
| 71 | The variable `indian-default-script' specifies the script of the glyph. | ||
| 72 | Optional argument SCRIPT, if non-nil, overrides `indian-default-script'. | ||
| 73 | See also the function `indian-char-glyph'." | ||
| 74 | (or script | ||
| 75 | (setq script indian-default-script)) | ||
| 76 | (let ((offset (get script 'indian-glyph-code-offset))) | ||
| 77 | (or (integerp offset) | ||
| 78 | (error "Invalid script name: %s" script)) | ||
| 79 | (or (and (>= index 0) (< index 256)) | ||
| 80 | (error "Invalid glyph index: %d" index)) | ||
| 81 | (setq index (+ offset index)) | ||
| 82 | (make-char 'indian-glyph (+ (/ index 96) 32) (+ (% index 96) 32)))) | ||
| 83 | |||
| 84 | (defvar indian-glyph-max-char | ||
| 85 | (indian-glyph-char | ||
| 86 | 255 (aref indian-script-table (1- (length indian-script-table)))) | ||
| 87 | "The maximum valid code of characters in the charset `indian-glyph'.") | ||
| 88 | |||
| 89 | (defun indian-char-glyph (char) | ||
| 90 | "Return information about the glphy code for CHAR of `indian-glyph' charset. | ||
| 91 | The value is (INDEX . SCRIPT), where INDEX is the glyph index | ||
| 92 | in the font that Indian script name SCRIPT specifies. | ||
| 93 | See also the function `indian-glyph-char'." | ||
| 94 | (let ((split (split-char char)) | ||
| 95 | code) | ||
| 96 | (or (eq (car split) 'indian-glyph) | ||
| 97 | (error "Charset of `%c' is not indian-glyph" char)) | ||
| 98 | (or (<= char indian-glyph-max-char) | ||
| 99 | (error "Invalid indian-glyph char: %d" char)) | ||
| 100 | (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32)) | ||
| 101 | (cons (% code 256) (aref indian-script-table (/ code 256))))) | ||
| 102 | |||
| 103 | (define-ccl-program ccl-encode-indian-glyph-font | 69 | (define-ccl-program ccl-encode-indian-glyph-font |
| 104 | `(0 | 70 | `(0 |
| 105 | ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256)) | 71 | ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256)) |