annotate lisp/language/indian.el @ 85842:96510b236eb5

(mail-abbrevs-mode): Use define-minor-mode. (mail-abbrevs-setup): Use abbrev-expand-functions. (build-mail-abbrevs): Use with-temp-buffer. (define-mail-abbrev): Simplify. (mail-abbrev-expand-wrapper): Rename sendmail-pre-abbrev-expand-hook. Change it for use on abbrev-expand-functions. (mail-abbrev-complete-alias): Use with-syntax-table.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 31 Oct 2007 20:30:28 +0000
parents 0938de05f510
children b5d3fc1c4afe f55f9811f5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
1 ;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74544
diff changeset
3 ;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
74544
43cc94d955c2 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 64085
diff changeset
4 ;; Free Software Foundation, Inc.
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74544
diff changeset
5 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
62396
197607499a29 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 57537
diff changeset
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
197607499a29 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 57537
diff changeset
7 ;; Registration Number H14PRO021
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
8
49704
003055ca7e13 Maintainer's mail address changed.
Kenichi Handa <handa@m17n.org>
parents: 47701
diff changeset
9 ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
42312
c7ffa58f9637 Add keyword.
Pavel Janík <Pavel@Janik.cz>
parents: 42152
diff changeset
10 ;; Keywords: multilingual, i18n, Indian
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
78309
0938de05f510 Restore comma mistakenly removed in last change.
Glenn Morris <rgm@gnu.org>
parents: 78300
diff changeset
16 ;; the Free Software Foundation; either version 3, or (at your option)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; any later version.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
18
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
22 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
23
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
17314
f438ebf1c679 Fix FSF address in comment.
Kenichi Handa <handa@m17n.org>
parents: 17300
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62396
diff changeset
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62396
diff changeset
27 ;; Boston, MA 02110-1301, USA.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
28
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29 ;;; Commentary:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
31 ;; This file defines in-is13194 coding system and relationship between
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
32 ;; indian-glyph character-set and various CDAC fonts.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
33
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
34 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
35
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
36 (make-coding-system
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
37 'in-is13194 2 ?D
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 42055
diff changeset
38 "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
39 '(ascii indian-is13194 nil nil
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
40 nil ascii-eol)
46743
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
41 `((safe-chars . ,(let ((table (make-char-table 'safe-chars nil)))
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
42 (set-char-table-range table 'indian-is13194 t)
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
43 (dotimes (i 127)
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
44 (aset table i t)
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
45 (aset table (decode-char 'ucs (+ #x900 i)) t))
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
46 table))
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
47 (post-read-conversion . in-is13194-post-read-conversion)
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
48 (pre-write-conversion . in-is13194-pre-write-conversion)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
49
46743
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
50 (define-coding-system-alias 'devanagari 'in-is13194)
d341cac00baf (in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents: 42312
diff changeset
51
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
52 (defvar indian-font-foundry 'cdac
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
53 "Font foundry for Indian characters.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
54 Currently supported foundries are `cdac' and `akruti'.")
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
55
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
56 (defvar indian-script-language-alist
57537
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
57 '((devanagari (hindi sanskrit) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
58 (bengali (bengali assamese) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
59 (gurmukhi (punjabi) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
60 (gujarati (gujarati) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
61 (oriya (oriya) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
62 (tamil (tamil) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
63 (telugu (telugu) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
64 (kannada (kannada) nil)
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
65 (malayalam (malayalam) nil))
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
66 "Alist of Indian scripts vs the corresponding language list and font foundry.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
67 Each element has this form:
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
68
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
69 (SCRIPT LANGUAGE-LIST FONT-FOUNDRY)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
70
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
71 SCRIPT is one of Indian script names.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
72
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
73 LANGUAGE-LIST is a list of Indian langauge names SCRIPT is used for.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
74 The list is in the priority order.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
75
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
76 FONT-FOUNDRY is a font foundry representing a group of Indian
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
77 fonts. If the value is nil, the value of `indian-font-foundry'
57537
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
78 is used.")
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
79
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
80 (defconst indian-font-char-index-table
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
81 '( ; for which language(s)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
82 ;; CDAC fonts
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
83 (#x0000 . cdac:dv-ttsurekh) ; hindi, etc
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
84 (#x0100 . cdac:sd-ttsurekh) ; sanskrit
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
85 (#x0200 . cdac:bn-ttdurga) ; bengali
50388
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
86 (#x0300 . cdac:tm-ttvalluvar) ; tamil
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
87 (#x0400 . cdac:tl-tthemalatha) ; telugu
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
88 (#x0500 . cdac:as-ttdurga) ; assamese
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
89 (#x0600 . cdac:or-ttsarala) ; oriya
50388
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
90 (#x0700 . cdac:kn-ttuma) ; kannada
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
91 (#x0800 . cdac:ml-ttkarthika) ; malayalam
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
92 (#x0900 . cdac:gj-ttavantika) ; gujarati
40bda6ae386e (indian-font-char-index-table): Fix the
Kenichi Handa <handa@m17n.org>
parents: 50256
diff changeset
93 (#x0A00 . cdac:pn-ttamar) ; punjabi
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
94
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
95 ;; AKRUTI fonts
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
96 (#x0B00 . akruti:dev) ; hindi, etc
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
97 (#x0C00 . akruti:bng) ; bengali
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
98 (#x0D00 . akruti:pnj) ; punjabi
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
99 (#x0E00 . akruti:guj) ; gujarati
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
100 (#x0F00 . akruti:ori) ; oriya
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
101 (#x1000 . akruti:tml) ; tamil
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
102 (#x1100 . akruti:tlg) ; telugu
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
103 (#x1200 . akruti:knd) ; kannada
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
104 (#x1300 . akruti:mal) ; malayalam
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
105 )
57537
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
106 "Alist of indices of `indian-glyph' character vs Indian font identifiers.
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
107 Each element has this form: (INDEX . FONT-IDENTIFIER)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
108
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
109 INDEX is an index number of the first character in the charset
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
110 `indian-glyph' assigned for glyphs in the font specified by
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
111 FONT-IDENTIFIER. Currently FONT-IDENTIFIERs are defined for CDAC
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
112 and AKRUTI font groups.")
57537
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
113
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
114 (defun indian-font-char (index font-identifier)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
115 "Return character of charset `indian-glyph' made from glyph index INDEX.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
116 FONT-IDENTIFIER is an identifier of an Indian font listed in the
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
117 variable `indian-font-char-index-table'. It specifies which
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
118 font INDEX is for."
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
119 (if (or (< index 0) (> index 255))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
120 (error "Invalid glyph index: %d" index))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
121 (let ((start (car (rassq font-identifier indian-font-char-index-table))))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
122 (if (not start)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
123 (error "Unknown font identifier: %s" font-identifier))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
124 (setq index (+ start index))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
125 (make-char 'indian-glyph (+ (/ index 96) 32) (+ (% index 96) 32))))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
126
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
127 ;; Return a range of characters (cons of min and max character) of the
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
128 ;; charset `indian-glyph' for displaying SCRIPT in LANGUAGE by a font
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
129 ;; of FOUNDRY.
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
130
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
131 (defun indian-font-char-range (font-identifier)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
132 (cons (indian-font-char 0 font-identifier)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
133 (indian-font-char 255 font-identifier)))
57537
b9687fdf909d (indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
134
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
135 (defvar indian-script-table
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
136 '[
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
137 devanagari
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
138 sanskrit
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
139 bengali
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
140 tamil
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
141 telugu
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
142 assamese
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
143 oriya
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
144 kannada
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
145 malayalam
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
146 gujarati
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
147 punjabi
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
148 ]
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
149 "Vector of Indian script names.")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
150
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
151 (let ((len (length indian-script-table))
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
152 (i 0))
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
153 (while (< i len)
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
154 (put (aref indian-script-table i) 'indian-glyph-code-offset (* 256 i))
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
155 (setq i (1+ i))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
156
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
157 (defvar indian-default-script 'devanagari
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
158 "Default script for Indian languages.
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
159 Each Indian language environment sets this value
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
160 to one of `indian-script-table' (which see).
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
161 The default value is `devanagari'.")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
162
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
163 (define-ccl-program ccl-encode-indian-glyph-font
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
164 `(0
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
165 ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256))
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
166 (r1 = ((((r1 * 96) + r2) - ,(+ (* 32 96) 32)) % 256))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
167
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
168 (setq font-ccl-encoder-alist
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
169 (cons (cons "-CDAC" 'ccl-encode-indian-glyph-font)
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
170 font-ccl-encoder-alist))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
171
50256
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
172 (setq font-ccl-encoder-alist
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
173 (cons (cons "-AKRUTI" 'ccl-encode-indian-glyph-font)
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
174 font-ccl-encoder-alist))
104cf4fa2a8e (indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents: 49704
diff changeset
175
33778
6d966e8b4bbe Use provide.
Dave Love <fx@gnu.org>
parents: 23158
diff changeset
176 (provide 'indian)
41469
f091948e4d1c Completely re-written.
Richard M. Stallman <rms@gnu.org>
parents: 38436
diff changeset
177
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50388
diff changeset
178 ;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
179 ;;; indian.el ends here