/[emacs]/emacs/lisp/language/indian.el
ViewVC logotype

Diff of /emacs/lisp/language/indian.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by pj, Tue Dec 11 06:57:29 2001 UTC revision 1.17 by fx, Sat Dec 15 17:55:23 2001 UTC
# Line 66  Each Indian language environment sets th Line 66  Each Indian language environment sets th
66  to one of `indian-script-table' (which see).  to one of `indian-script-table' (which see).
67  The default value is `devanagari'.")  The default value is `devanagari'.")
68    
 (defun indian-glyph-char (index &optional script)  
   "Return character of charset `indian-glyph' made from glyph index INDEX.  
 The variable `indian-default-script' specifies the script of the glyph.  
 Optional argument SCRIPT, if non-nil, overrides `indian-default-script'.  
 See also the function `indian-char-glyph'."  
   (or script  
       (setq script indian-default-script))  
   (let ((offset (get script 'indian-glyph-code-offset)))  
     (or (integerp offset)  
         (error "Invalid script name: %s" script))  
     (or (and (>= index 0) (< index 256))  
         (error "Invalid glyph index: %d" index))  
     (setq index (+ offset index))  
     (make-char 'indian-glyph (+ (/ index 96) 32) (+ (% index 96) 32))))  
   
 (defvar indian-glyph-max-char  
   (indian-glyph-char  
    255 (aref indian-script-table (1- (length indian-script-table))))  
   "The maximum valid code of characters in the charset `indian-glyph'.")  
   
 (defun indian-char-glyph (char)  
   "Return information about the glphy code for CHAR of `indian-glyph' charset.  
 The value is (INDEX . SCRIPT), where INDEX is the glyph index  
 in the font that Indian script name SCRIPT specifies.  
 See also the function `indian-glyph-char'."  
   (let ((split (split-char char))  
         code)  
     (or (eq (car split) 'indian-glyph)  
         (error "Charset of `%c' is not indian-glyph" char))  
     (or (<= char indian-glyph-max-char)  
         (error "Invalid indian-glyph char: %d" char))  
     (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32))  
     (cons (% code 256) (aref indian-script-table (/ code 256)))))  
   
69  (define-ccl-program ccl-encode-indian-glyph-font  (define-ccl-program ccl-encode-indian-glyph-font
70    `(0    `(0
71      ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256))      ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256))

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26