Mercurial > emacs
annotate lisp/international/fontset.el @ 94847:5e64dca662f0
Remove assumption about what nil means as a first arument to vc-do-command.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Sat, 10 May 2008 13:27:16 +0000 |
parents | 889bc336b89b |
children | 81ec00f72dc6 |
rev | line source |
---|---|
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
36368
diff
changeset
|
1 ;;; fontset.el --- commands for handling fontset |
17052 | 2 |
74544 | 3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
79709 | 4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
74605
6ee41fdd69ff
Update AIST copyright years.
Kenichi Handa <handa@m17n.org>
parents:
74544
diff
changeset
|
5 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
79709 | 6 ;; 2005, 2006, 2007, 2008 |
62274 | 7 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 ;; Registration Number H14PRO021 | |
90420
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
9 ;; Copyright (C) 2003, 2006 |
89483 | 10 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
11 ;; Registration Number H13PRO009 | |
17052 | 12 |
89274 | 13 ;; Keywords: mule, i18n, fontset |
17052 | 14 |
15 ;; This file is part of GNU Emacs. | |
16 | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
17 ;; GNU Emacs is free software: you can redistribute it and/or modify |
17052 | 18 ;; it under the terms of the GNU General Public License as published by |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
19 ;; the Free Software Foundation, either version 3 of the License, or |
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
20 ;; (at your option) any later version. |
17052 | 21 |
22 ;; GNU Emacs is distributed in the hope that it will be useful, | |
23 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 ;; GNU General Public License for more details. | |
26 | |
27 ;; You should have received a copy of the GNU General Public License | |
94664
889bc336b89b
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
28 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
17052 | 29 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
36368
diff
changeset
|
30 ;;; Commentary: |
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
36368
diff
changeset
|
31 |
17052 | 32 ;;; Code: |
33 | |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
34 ;; Setup font-encoding-alist for all known encodings. |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
35 |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
36 (setq font-encoding-alist |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
37 '(("iso8859-1$" . iso-8859-1) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
38 ("iso8859-2$" . iso-8859-2) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
39 ("iso8859-3$" . iso-8859-3) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
40 ("iso8859-4$" . iso-8859-4) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
41 ("iso8859-5$" . iso-8859-5) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
42 ("iso8859-6$" . iso-8859-6) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
43 ("iso8859-7$" . iso-8859-7) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
44 ("iso8859-8$" . iso-8859-8) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
45 ("iso8859-9$" . iso-8859-9) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
46 ("iso8859-10$" . iso-8859-10) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
47 ("iso8859-11$" . iso-8859-11) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
48 ("iso8859-13$" . iso-8859-13) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
49 ("iso8859-14$" . iso-8859-14) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
50 ("iso8859-15$" . iso-8859-15) |
91330
48e4aecfcc5e
(font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
91327
diff
changeset
|
51 ("iso8859-16$" . iso-8859-16) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
52 ("gb2312.1980" . chinese-gb2312) |
90005
0c0b009323eb
(font-encoding-alist): Add gbk.
Kenichi Handa <handa@m17n.org>
parents:
89909
diff
changeset
|
53 ("gbk" . chinese-gbk) |
91325
ff65e30f34e2
(font-encoding-alist): Don't set the
Kenichi Handa <handa@m17n.org>
parents:
91300
diff
changeset
|
54 ("gb18030" . (unicode . nil)) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
55 ("jisx0208.1978" . japanese-jisx0208-1978) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
56 ("jisx0208" . japanese-jisx0208) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
57 ("jisx0201" . jisx0201) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
58 ("jisx0212" . japanese-jisx0212) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
59 ("ksc5601.1987" . korean-ksc5601) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
60 ("cns11643.1992.*1" . chinese-cns11643-1) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
61 ("cns11643.1992.*2" . chinese-cns11643-2) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
62 ("cns11643.1992.*3" . chinese-cns11643-3) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
63 ("cns11643.1992.*4" . chinese-cns11643-4) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
64 ("cns11643.1992.*5" . chinese-cns11643-5) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
65 ("cns11643.1992.*6" . chinese-cns11643-6) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
66 ("cns11643.1992.*7" . chinese-cns11643-7) |
89809
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
67 ("cns11643.92p1-0" . chinese-cns11643-1) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
68 ("cns11643.92p2-0" . chinese-cns11643-2) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
69 ("cns11643.92p3-0" . chinese-cns11643-3) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
70 ("cns11643.92p4-0" . chinese-cns11643-4) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
71 ("cns11643.92p5-0" . chinese-cns11643-5) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
72 ("cns11643.92p6-0" . chinese-cns11643-6) |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
73 ("cns11643.92p7-0" . chinese-cns11643-7) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
74 ("big5" . big5) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
75 ("viscii" . viscii) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
76 ("tis620" . tis620-2533) |
90091
4a0f91659a65
(font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
90005
diff
changeset
|
77 ("microsoft-cp1251" . windows-1251) |
90420
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
78 ("koi8-r" . koi8-r) |
91233
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
79 ("jisx0213.2000-1" . japanese-jisx0213-1) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
80 ("jisx0213.2000-2" . japanese-jisx0213-2) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
81 ("jisx0213.2004-1" . japanese-jisx0213.2004-1) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
82 ("iso10646-1$" . (unicode-bmp . nil)) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
83 ("iso10646.indian-1" . (unicode-bmp . nil)) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
84 ("unicode-bmp" . (unicode-bmp . nil)) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
85 ("abobe-symbol" . symbol) |
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
86 ("sisheng_cwnn" . chinese-sisheng) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
87 ("mulearabic-0" . arabic-digit) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
88 ("mulearabic-1" . arabic-1-column) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
89 ("mulearabic-2" . arabic-2-column) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
90 ("muleipa" . ipa) |
90504
8de7c6bf6944
(font-encoding-alist): Fix for
Kenichi Handa <handa@m17n.org>
parents:
90493
diff
changeset
|
91 ("ethiopic-unicode" . (unicode-bmp . ethiopic)) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
92 ("is13194-devanagari" . indian-is13194) |
89483 | 93 ("Devanagari-CDAC" . devanagari-cdac) |
94 ("Sanskrit-CDAC" . sanskrit-cdac) | |
95 ("Bengali-CDAC" . bengali-cdac) | |
96 ("Assamese-CDAC" . assamese-cdac) | |
97 ("Punjabi-CDAC" . punjabi-cdac) | |
98 ("Gujarati-CDAC" . gujarati-cdac) | |
99 ("Oriya-CDAC" . oriya-cdac) | |
100 ("Tamil-CDAC" . tamil-cdac) | |
101 ("Telugu-CDAC" . telugu-cdac) | |
102 ("Kannada-CDAC" . kannada-cdac) | |
103 ("Malayalam-CDAC" . malayalam-cdac) | |
104 ("Devanagari-Akruti" . devanagari-akruti) | |
105 ("Bengali-Akruti" . bengali-akruti) | |
106 ("Punjabi-Akruti" . punjabi-akruti) | |
107 ("Gujarati-Akruti" . gujarati-akruti) | |
108 ("Oriya-Akruti" . oriya-akruti) | |
109 ("Tamil-Akruti" . tamil-akruti) | |
110 ("Telugu-Akruti" . telugu-akruti) | |
111 ("Kannada-Akruti" . kannada-akruti) | |
112 ("Malayalam-Akruti" . malayalam-akruti) | |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
113 ("muleindian-2" . indian-2-column) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
114 ("muleindian-1" . indian-1-column) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
115 ("mulelao-1" . mule-lao) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
116 ("muletibetan-2" . tibetan) |
91233
4fdf769f4c0b
(font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents:
91195
diff
changeset
|
117 ("muletibetan-1" . tibetan-1-column))) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
118 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
119 (setq font-encoding-charset-alist |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
120 '((latin-iso8859-1 . iso-8859-1) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
121 (latin-iso8859-2 . iso-8859-2) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
122 (latin-iso8859-3 . iso-8859-3) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
123 (latin-iso8859-4 . iso-8859-4) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
124 (latin-iso8859-9 . iso-8859-9) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
125 (latin-iso8859-10 . iso-8859-10) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
126 (latin-iso8859-13 . iso-8859-13) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
127 (latin-iso8859-14 . iso-8859-14) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
128 (latin-iso8859-15 . iso-8859-15) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
129 (latin-iso8859-16 . iso-8859-16) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
130 (cyrillic-iso8859-5 . iso-8859-5) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
131 (greek-iso8859-7 . iso-8859-7) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
132 (arabic-iso8859-6 . iso-8859-6) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
133 (thai-tis620 . tis620-2533) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
134 (latin-jisx0201 . jisx0201) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
135 (katakana-jisx0201 . jisx0201) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
136 (chinese-big5-1 . big5) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
137 (chinese-big5-2 . big5) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
138 (vietnamese-viscii-lower . viscii) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
139 (vietnamese-viscii-upper . viscii) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
140 (tibetan . unicode-bmp))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
141 |
90420
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
142 (setq script-representative-chars |
90493
c5c4ee67b82e
(script-representative-chars): Add an
Kenichi Handa <handa@m17n.org>
parents:
90420
diff
changeset
|
143 '((latin ?A ?Z ?a ?z) |
c5c4ee67b82e
(script-representative-chars): Add an
Kenichi Handa <handa@m17n.org>
parents:
90420
diff
changeset
|
144 (greek #x3A9) |
90420
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
145 (coptic #x3E2) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
146 (cyrillic #x42F) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
147 (armenian #x531) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
148 (hebrew #x5D0) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
149 (arabic #x628) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
150 (syriac #x710) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
151 (thaana #x78C) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
152 (devanagari #x915) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
153 (bengali #x995) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
154 (gurmukhi #xA15) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
155 (gujarati #xA95) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
156 (oriya #xB15) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
157 (tamil #xB95) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
158 (telugu #xC15) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
159 (kannada #xC95) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
160 (malayalam #xD15) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
161 (sinhala #xD95) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
162 (thai #xE17) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
163 (lao #xEA5) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
164 (tibetan #xF40) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
165 (myanmar #x1000) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
166 (georgian #x10D3) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
167 (ethiopic #x1208) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
168 (cherokee #x13B6) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
169 (canadian-aboriginal #x14C0) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
170 (ogham #x168F) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
171 (runic #x16A0) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
172 (khmer #x1780) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
173 (mongolian #x1826) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
174 (braille #x2800) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
175 (ideographic-description #x2FF0) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
176 (cjk-misc #x300E) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
177 (kana #x304B) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
178 (bopomofo #x3105) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
179 (kanbun #x319D) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
180 (han #x5B57) |
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
181 (yi #xA288) |
91358
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
182 (cham #xAA00) |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
183 (tai-viet #xAA80) |
90420
8a1866284f74
(font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents:
90348
diff
changeset
|
184 (hangul #xAC00))) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
185 |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
186 (setq otf-script-alist |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
187 '((arab . arabic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
188 (armn . armenian) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
189 (bali . balinese) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
190 (beng . bengali) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
191 (bopo . bopomofo) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
192 (brai . braille) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
193 (bugi . buginese) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
194 (buhd . buhid) |
90592
d9cb37754a26
(otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents:
90512
diff
changeset
|
195 (byzm . byzantine-musical-symbol) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
196 (cans . canadian-aboriginal) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
197 (cher . cherokee) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
198 (copt . coptic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
199 (xsux . cuneiform) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
200 (cyrl . cyrillic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
201 (cprt . cypriot) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
202 (dsrt . deseret) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
203 (deva . devanagari) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
204 (ethi . ethiopic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
205 (geor . georgian) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
206 (glag . glagolitic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
207 (goth . gothic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
208 (grek . greek) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
209 (gujr . gujarati) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
210 (guru . gurmukhi) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
211 (hani . han) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
212 (hang . hangul) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
213 (hano . hanunoo) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
214 (hebr . hebrew) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
215 (kana . kana) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
216 (knda . kannada) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
217 (khar . kharoshthi) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
218 (khmr . khmer) |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
219 (lao\ . lao) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
220 (latn . latin) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
221 (limb . limbu) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
222 (linb . linear_b) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
223 (mlym . malayalam) |
90592
d9cb37754a26
(otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents:
90512
diff
changeset
|
224 (math . mathematical) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
225 (mong . mongolian) |
90592
d9cb37754a26
(otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents:
90512
diff
changeset
|
226 (musc . musical-symbol) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
227 (mymr . myanmar) |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
228 (nko\ . nko) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
229 (ogam . ogham) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
230 (ital . old_italic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
231 (xpeo . old_persian) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
232 (orya . oriya) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
233 (osma . osmanya) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
234 (phag . phags-pa) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
235 (phnx . phoenician) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
236 (runr . runic) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
237 (shaw . shavian) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
238 (sinh . sinhala) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
239 (sylo . syloti_nagri) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
240 (syrc . syriac) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
241 (tglg . tagalog) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
242 (tagb . tagbanwa) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
243 (taml . tamil) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
244 (tale . tai_le) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
245 (telu . telugu) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
246 (thaa . thaana) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
247 (thai . thai) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
248 (tibt . tibetan) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
249 (tfng . tifinagh) |
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
250 (ugar . ugaritic) |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
251 (yi\ \ . yi))) |
90512
fb8ab271951f
(otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents:
90504
diff
changeset
|
252 |
29234
c9a5f356fe77
Set family names of non-latin charsets in default fontset to "*".
Kenichi Handa <handa@m17n.org>
parents:
29168
diff
changeset
|
253 ;; Set standard fontname specification of characters in the default |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
254 ;; fontset to find an appropriate font for each script/charset. The |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
255 ;; specification has the form ((SCRIPT FONT-SPEC ...) ...), where |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
256 ;; FONT-SPEC is: |
91165
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
257 ;; a cons (FAMILY . REGISTRY), |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
258 ;; or a string FONT-NAME, |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
259 ;; or an object created by `font-spec'. |
89483 | 260 ;; |
91165
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
261 ;; FAMILY may be nil, in which case, the the corresponding name of |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
262 ;; default face is used. If REGISTRY contains a character `-', the |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
263 ;; string before that is embedded in `CHARSET_REGISTRY' field, and the |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
264 ;; string after that is embedded in `CHARSET_ENCODING' field. If it |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
265 ;; does not contain `-', the whole string is embedded in |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
266 ;; `CHARSET_REGISTRY' field, and a wild card character `*' is embedded |
3f9bb85be0a4
(x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents:
91156
diff
changeset
|
267 ;; in `CHARSET_ENCODING' field. |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
268 ;; |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
269 ;; SCRIPT is a symbol that appears as an element of the char table |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
270 ;; `char-script-table'. SCRIPT may be a charset specifying the range |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
271 ;; of characters. |
17052 | 272 |
49287
5cb7e7103296
Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents:
47711
diff
changeset
|
273 (defun setup-default-fontset () |
5cb7e7103296
Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents:
47711
diff
changeset
|
274 "Setup the default fontset." |
89483 | 275 (new-fontset |
276 "fontset-default" | |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
277 `(;; for each script |
89483 | 278 (latin (nil . "ISO8859-1") |
279 (nil . "ISO8859-2") | |
280 (nil . "ISO8859-3") | |
281 (nil . "ISO8859-4") | |
282 (nil . "ISO8859-9") | |
283 (nil . "ISO8859-10") | |
284 (nil . "ISO8859-13") | |
285 (nil . "ISO8859-14") | |
286 (nil . "ISO8859-15") | |
91330
48e4aecfcc5e
(font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
91327
diff
changeset
|
287 (nil . "ISO8859-16") |
91358
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
288 (nil . "VISCII1.1-1") |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
289 (nil . "ISO10646-1")) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
290 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
291 (thai ,(font-spec :registry "iso10646-1" :otf '(thai nil nil (mark))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
292 (nil . "TIS620*") |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
293 (nil . "ISO8859-11")) |
89483 | 294 |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
295 (devanagari ,(font-spec :registry "iso10646-1" :otf '(deva nil (rphf))) |
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
296 (nil . "iso10646.indian-1")) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
297 (bengali ,(font-spec :registry "iso10646-1" :otf '(beng nil (rphf)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
298 (gurmukhi ,(font-spec :registry "iso10646-1" :otf '(guru nil (blwf)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
299 (gujarati ,(font-spec :registry "iso10646-1" :otf '(gujr nil (rphf)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
300 (oriya ,(font-spec :registry "iso10646-1" :otf '(orya nil (rphf)))) |
91156
d5ce4acff895
(otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
301 (tamil ,(font-spec :registry "iso10646-1" :otf '(taml nil (akhn)))) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
302 (telugu ,(font-spec :registry "iso10646-1" :otf '(telu nil (blwf)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
303 (kannada ,(font-spec :registry "iso10646-1" :otf '(knda nil (rphf)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
304 (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
305 (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn)))) |
89483 | 306 |
91300
3f8bf669d610
(setup-default-fontset): Fix lao OTF script name.
Kenichi Handa <handa@m17n.org>
parents:
91291
diff
changeset
|
307 (lao ,(font-spec :registry "iso10646-1" :otf '(lao\ nil nil (mark))) |
92181
5b7baf2c115a
(setup-default-fontset): Add non-OTF
Kenichi Handa <handa@m17n.org>
parents:
91661
diff
changeset
|
308 ,(font-spec :registry "iso10646-1" :script 'lao) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
309 (nil . "MuleLao-1")) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
310 |
90946
2943395de0ab
(setup-default-fontset): Add tai-viet.
Kenichi Handa <handa@m17n.org>
parents:
90737
diff
changeset
|
311 (tai-viet ("TaiViet" . "iso10646-1")) |
2943395de0ab
(setup-default-fontset): Add tai-viet.
Kenichi Handa <handa@m17n.org>
parents:
90737
diff
changeset
|
312 |
89483 | 313 ;; both for script and charset. |
91195
24adc06a08d0
(setup-default-fontset): Add OpenType
Kenichi Handa <handa@m17n.org>
parents:
91165
diff
changeset
|
314 (tibetan ,(font-spec :registry "iso10646-1" |
24adc06a08d0
(setup-default-fontset): Add OpenType
Kenichi Handa <handa@m17n.org>
parents:
91165
diff
changeset
|
315 :otf '(tibt nil (ccmp blws abvs))) |
24adc06a08d0
(setup-default-fontset): Add OpenType
Kenichi Handa <handa@m17n.org>
parents:
91165
diff
changeset
|
316 ,(font-spec :family "mtib" :registry "iso10646-1") |
24adc06a08d0
(setup-default-fontset): Add OpenType
Kenichi Handa <handa@m17n.org>
parents:
91165
diff
changeset
|
317 (nil . "muletibetan-2")) |
89258
b6c2beacc874
("fontset-default"): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
89143
diff
changeset
|
318 |
89483 | 319 ;; both for script and charset. |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
320 (ethiopic ,(font-spec :registry "iso10646-1" :script 'ethiopic) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
321 (nil . "ethiopic-unicode")) |
89483 | 322 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
323 (greek ,(font-spec :registry "iso10646-1" :script 'greek) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
324 (nil . "ISO8859-7")) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
325 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
326 (cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
327 (nil . "ISO8859-5") |
90091
4a0f91659a65
(font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
90005
diff
changeset
|
328 (nil . "microsoft-cp1251") |
4a0f91659a65
(font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents:
90005
diff
changeset
|
329 (nil . "koi8-r")) |
89483 | 330 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
331 (arabic ,(font-spec :registry "iso10646-1" |
91661
c9130ca657e0
(setup-default-fontset): Fix arabic otf
Kenichi Handa <handa@m17n.org>
parents:
91358
diff
changeset
|
332 :otf '(arab nil (init medi fini liga))) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
333 (nil . "MuleArabic-0") |
89483 | 334 (nil . "MuleArabic-1") |
335 (nil . "MuleArabic-2") | |
336 (nil . "ISO8859-6")) | |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
337 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
338 (hebrew ,(font-spec :registry "iso10646-1" :script 'hebrew) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
339 (nil . "ISO8859-8")) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
340 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
341 (syriac ,(font-spec :registry "iso10646-1" :script 'syriac)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
342 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
343 (thaana ,(font-spec :registry "iso10646-1" :otf '(thaa nil nil))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
344 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
345 (myanmar ,(font-spec :registry "iso10646-1" :script 'myanmar)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
346 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
347 (georgian ,(font-spec :registry "iso10646-1" :script 'georgian)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
348 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
349 (cherokee ,(font-spec :registry "iso10646-1" :script 'cherokee)) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
350 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
351 (canadian-aboriginal ,(font-spec :registry "iso10646-1" |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
352 :script 'canadian-aboriginal)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
353 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
354 (ogham ,(font-spec :registry "iso10646-1" :script 'ogham)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
355 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
356 (runic ,(font-spec :registry "iso10646-1" :script 'runic)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
357 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
358 (khmer ,(font-spec :registry "iso10646-1" :otf '(khmr nil (pres)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
359 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
360 (yi ,(font-spec :registry "iso10646-1" :script 'yi)) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
361 |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
362 (kana ,(font-spec :registry "iso10646-1" :script 'kana) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
363 (nil . "JISX0208*") |
89483 | 364 (nil . "GB2312.1980-0") |
365 (nil . "KSC5601.1987*") | |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
366 (nil . "JISX0201*") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
367 (nil . "JISX0213.2000-1") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
368 (nil . "JISX0213.2004-1")) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
369 |
93516
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
370 (bopomofo ,(font-spec :registry "iso10646-1" :script 'bopomofo) |
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
371 (nil . "sisheng_cwnn-0")) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
372 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
373 (han ,(font-spec :registry "iso10646-1" :language 'ja) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
374 ,(font-spec :registry "iso10646-1" :language 'zh) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
375 (nil . "GB2312.1980-0") |
89483 | 376 (nil . "JISX0208*") |
377 (nil . "JISX0212*") | |
378 (nil . "big5*") | |
379 (nil . "KSC5601.1987*") | |
380 (nil . "CNS11643.1992-1") | |
381 (nil . "CNS11643.1992-2") | |
382 (nil . "CNS11643.1992-3") | |
383 (nil . "CNS11643.1992-4") | |
384 (nil . "CNS11643.1992-5") | |
385 (nil . "CNS11643.1992-6") | |
386 (nil . "CNS11643.1992-7") | |
387 (nil . "gbk-0") | |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
388 (nil . "gb18030") |
89483 | 389 (nil . "JISX0213.2000-1") |
89800
6458a4233000
(setup-default-fontset): Register "JISX0213.2004-1".
Kenichi Handa <handa@m17n.org>
parents:
89636
diff
changeset
|
390 (nil . "JISX0213.2000-2") |
6458a4233000
(setup-default-fontset): Register "JISX0213.2004-1".
Kenichi Handa <handa@m17n.org>
parents:
89636
diff
changeset
|
391 (nil . "JISX0213.2004-1")) |
17052 | 392 |
91358
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
393 (cjk-misc ,(font-spec :registry "iso10646-1" :language 'ja) |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
394 ,(font-spec :registry "iso10646-1" :language 'zh) |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
395 (nil . "GB2312.1980-0") |
89483 | 396 (nil . "JISX0208*") |
397 (nil . "JISX0212*") | |
398 (nil . "big5*") | |
399 (nil . "KSC5601.1987*") | |
400 (nil . "CNS11643.1992-1") | |
401 (nil . "CNS11643.1992-2") | |
402 (nil . "CNS11643.1992-3") | |
403 (nil . "CNS11643.1992-4") | |
404 (nil . "CNS11643.1992-5") | |
405 (nil . "CNS11643.1992-6") | |
406 (nil . "CNS11643.1992-7") | |
407 (nil . "gbk-0") | |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
408 (nil . "gb18030") |
89483 | 409 (nil . "JISX0213.2000-1") |
410 (nil . "JISX0213.2000-2")) | |
88405 | 411 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
412 (hangul ,(font-spec :registry "iso10646-1" :language 'ko) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
413 (nil . "KSC5601.1987-0")) |
17052 | 414 |
93516
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
415 (braille ,(font-spec :registry "iso10646-1" :script 'braille)) |
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
416 |
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
417 (mathematical ,(font-spec :registry "iso10646-1" :script 'mathematical)) |
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
418 |
89483 | 419 ;; for each charset |
420 (ascii (nil . "ISO8859-1")) | |
421 (arabic-digit ("*" . "MuleArabic-0")) | |
422 (arabic-1-column ("*" . "MuleArabic-1")) | |
423 (arabic-2-column ("*" . "MuleArabic-2")) | |
424 (indian-is13194 (nil . "is13194-devanagari")) | |
425 (indian-1-column ("*" . "muleindian-2")) | |
426 ;; Indian CDAC | |
427 (devanagari-cdac (nil . "Devanagari-CDAC")) | |
428 (sanskrit-cdac (nil . "Sanskrit-CDAC")) | |
429 (bengali-cdac (nil . "Bengali-CDAC")) | |
430 (assamese-cdac (nil . "Assamese-CDAC")) | |
431 (punjabi-cdac (nil . "Punjabi-CDAC")) | |
432 (gujarati-cdac (nil . "Gujarati-CDAC")) | |
433 (oriya-cdac (nil . "Oriya-CDAC")) | |
434 (tamil-cdac (nil . "Tamil-CDAC")) | |
435 (telugu-cdac (nil . "Telugu-CDAC")) | |
436 (kannada-cdac (nil . "Kannada-CDAC")) | |
437 (malayalam-cdac (nil . "Malayalam-CDAC")) | |
438 ;; Indian AKRUTI | |
439 (devanagari-akruti (nil . "Devanagari-Akruti")) | |
440 (bengali-akruti (nil . "Bengali-Akruti")) | |
441 (punjabi-akruti (nil . "Punjabi-Akruti")) | |
442 (gujarati-akruti (nil . "Gujarati-Akruti")) | |
443 (oriya-akruti (nil . "Oriya-Akruti")) | |
444 (tamil-akruti (nil . "Tamil-Akruti")) | |
445 (telugu-akruti (nil . "Telugu-Akruti")) | |
446 (kannada-akruti (nil . "Kannada-Akruti")) | |
447 (malayalam-akruti (nil . "Malayalam-Akruti")) | |
448 ;;(devanagari-glyph ("altsys-dv_ttsurekh" . "devanagari-cdac")) | |
449 ;;(malayalam-glyph ("altsys-ml_ttkarthika" . "malayalam-cdac")) | |
93516
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
450 (ipa ,(font-spec :registry "iso10646-1" :script 'phonetic) |
664f1bc28031
(setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents:
92181
diff
changeset
|
451 (nil . "MuleIPA-1") |
91358
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
452 (nil . "iso10646-1")) |
17052 | 453 |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
454 ;; Fallback fonts |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
455 (nil (nil . "gb2312.1980") |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
456 (nil . "gbk-0") |
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
457 (nil . "gb18030") |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
458 (nil . "jisx0208") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
459 (nil . "ksc5601.1987") |
89809
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
460 (nil . "CNS11643.1992-1") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
461 (nil . "CNS11643.1992-2") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
462 (nil . "CNS11643.1992-3") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
463 (nil . "CNS11643.1992-4") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
464 (nil . "CNS11643.1992-5") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
465 (nil . "CNS11643.1992-6") |
c03a2732d0fd
(font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents:
89806
diff
changeset
|
466 (nil . "CNS11643.1992-7") |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
467 (nil . "big5") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
468 (nil . "jisx0213.2000-1") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
469 (nil . "jisx0213.2004-1") |
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
470 (nil . "jisx0212")) |
89483 | 471 )) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
472 |
89483 | 473 ;; Append Unicode fonts. |
474 ;; This may find fonts with more variants (bold, italic) but which | |
475 ;; don't cover many characters. | |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
476 (set-fontset-font "fontset-default" nil |
89483 | 477 '(nil . "iso10646-1") nil 'append) |
478 ;; These may find fonts that cover many characters but with fewer | |
479 ;; variants. | |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
480 (set-fontset-font "fontset-default" nil |
89483 | 481 '("gnu-unifont" . "iso10646-1") nil 'append) |
89806
960bd3cc1872
(setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents:
89802
diff
changeset
|
482 (set-fontset-font "fontset-default" nil |
91358
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
483 '("mutt-clearlyu" . "iso10646-1") nil 'append) |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
484 |
65fc7a40f435
(script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents:
91330
diff
changeset
|
485 (set-fontset-font "fontset-default" '(#xE000 . #xF8FF) nil)) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
486 |
89274 | 487 ;; These are the registered registries/encodings from |
488 ;; ftp://ftp.x.org/pub/DOCS/registry 2001/06/01 | |
17052 | 489 |
89274 | 490 ;; Name Reference |
491 ;; ---- --------- | |
492 ;; "DEC" [27] | |
493 ;; registry prefix | |
494 ;; "DEC.CNS11643.1986-2" [53] | |
495 ;; CNS11643 2-plane using the encoding | |
496 ;; suggested in that standard | |
497 ;; "DEC.DTSCS.1990-2" [54] | |
498 ;; DEC Taiwan Supplemental Character Set | |
499 ;; "fujitsu.u90x01.1991-0" [87] | |
500 ;; "fujitsu.u90x03.1991-0" [87] | |
501 ;; "GB2312.1980-0" [39],[12] | |
502 ;; China (PRC) Hanzi, GL encoding | |
503 ;; "GB2312.1980-1" [39] | |
504 ;; (deprecated) | |
505 ;; China (PRC) Hanzi, GR encoding | |
506 ;; "HP-Arabic8" [36] | |
507 ;; HPARABIC8 8-bit character set | |
508 ;; "HP-East8" [36] | |
509 ;; HPEAST8 8-bit character set | |
510 ;; "HP-Greek8" [36] | |
511 ;; HPGREEK8 8-bit character set | |
512 ;; "HP-Hebrew8" [36] | |
513 ;; HPHEBREW8 8-bit character set | |
514 ;; "HP-Japanese15" [36] | |
515 ;; HPJAPAN15 15-bit characer set, | |
516 ;; modified from industry defacto | |
517 ;; standard Shift-JIS | |
518 ;; "HP-Kana8" [36] | |
519 ;; HPKANA8 8-bit character set | |
520 ;; "HP-Korean15" [36] | |
521 ;; HPKOREAN15 15-bit character set | |
522 ;; "HP-Roman8" [36] | |
523 ;; HPROMAN8 8-bit character set | |
524 ;; "HP-SChinese15" [36] | |
525 ;; HPSCHINA15 15-bit character set for | |
526 ;; support of Simplified Chinese | |
527 ;; "HP-TChinese15" [36] | |
528 ;; HPTCHINA15 15-bit character set for | |
529 ;; support of Traditional Chinese | |
530 ;; "HP-Turkish8" [36] | |
531 ;; HPTURKISH8 8-bit character set | |
532 ;; "IPSYS" [59] | |
533 ;; registry prefix | |
534 ;; "IPSYS.IE-1" [59] | |
535 ;; "ISO2022"<REG>"-"<ENC> [44] | |
536 ;; "ISO646.1991-IRV" [107] | |
537 ;; ISO 646 International Reference Version | |
538 ;; "ISO8859-1" [15],[12] | |
539 ;; ISO Latin alphabet No. 1 | |
540 ;; "ISO8859-2" [15],[12] | |
541 ;; ISO Latin alphabet No. 2 | |
542 ;; "ISO8859-3" [15],[12] | |
543 ;; ISO Latin alphabet No. 3 | |
544 ;; "ISO8859-4" [15],[12] | |
545 ;; ISO Latin alphabet No. 4 | |
546 ;; "ISO8859-5" [15],[12] | |
547 ;; ISO Latin/Cyrillic alphabet | |
548 ;; "ISO8859-6" [15],[12] | |
549 ;; ISO Latin/Arabic alphabet | |
550 ;; "ISO8859-7" [15],[12] | |
551 ;; ISO Latin/Greek alphabet | |
552 ;; "ISO8859-8" [15],[12] | |
553 ;; ISO Latin/Hebrew alphabet | |
554 ;; "ISO8859-9" [15],[12] | |
555 ;; ISO Latin alphabet No. 5 | |
556 ;; "ISO8859-10" [15],[12] | |
557 ;; ISO Latin alphabet No. 6 | |
558 ;; "ISO8859-13" [15],[12] | |
559 ;; ISO Latin alphabet No. 7 | |
560 ;; "ISO8859-14" [15],[12] | |
561 ;; ISO Latin alphabet No. 8 | |
562 ;; "ISO8859-15" [15],[12] | |
563 ;; ISO Latin alphabet No. 9 | |
564 ;; "FCD8859-15" [7] | |
565 ;; (deprecated) | |
566 ;; ISO Latin alphabet No. 9, Final Committee Draft | |
567 ;; "ISO10646-1" [133] | |
568 ;; Unicode Universal Multiple-Octet Coded Character Set | |
569 ;; "ISO10646-MES" [133] | |
570 ;; (deprecated) | |
571 ;; Unicode Minimum European Subset | |
572 ;; "JISX0201.1976-0" [38],[12] | |
573 ;; 8-Bit Alphanumeric-Katakana Code | |
574 ;; "JISX0208.1983-0" [40],[12] | |
575 ;; Japanese Graphic Character Set, | |
576 ;; GL encoding | |
577 ;; "JISX0208.1990-0" [71] | |
578 ;; Japanese Graphic Character Set, | |
579 ;; GL encoding | |
580 ;; "JISX0208.1983-1" [40] | |
581 ;; (deprecated) | |
582 ;; Japanese Graphic Character Set, | |
583 ;; GR encoding | |
584 ;; "JISX0212.1990-0" [72] | |
585 ;; Supplementary Japanese Graphic Character Set, | |
586 ;; GL encoding | |
587 ;; "KOI8-R" [119] | |
588 ;; Cyrillic alphabet | |
589 ;; "KSC5601.1987-0" [41],[12] | |
590 ;; Korean Graphic Character Set, | |
591 ;; GL encoding | |
592 ;; "KSC5601.1987-1" [41] | |
593 ;; (deprecated) | |
594 ;; Korean Graphic Character Set, | |
595 ;; GR encoding | |
596 ;; "omron_CNS11643-0" [45] | |
597 ;; "omron_CNS11643-1" [45] | |
598 ;; "omron_BIG5-0" [45] | |
599 ;; "omron_BIG5-1" [45] | |
600 ;; "wn.tamil.1993" [103] | |
601 | |
88405 | 602 (defun set-font-encoding (pattern charset) |
89274 | 603 "Set arguments in `font-encoding-alist' (which see)." |
17052 | 604 (let ((slot (assoc pattern font-encoding-alist))) |
605 (if slot | |
88405 | 606 (setcdr slot charset) |
17052 | 607 (setq font-encoding-alist |
88405 | 608 (cons (cons pattern charset) font-encoding-alist))))) |
32646
43edadfecb51
Use registry "MuleTibetan-2" for Tibetan.
Kenichi Handa <handa@m17n.org>
parents:
29427
diff
changeset
|
609 |
17052 | 610 ;; Setting for suppressing XLoadQueryFont on big fonts. |
611 (setq x-pixel-size-width-font-regexp | |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
612 "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5") |
17052 | 613 |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
614 ;; These fonts require vertical centering. |
26886
8a6d8101919e
(vertical-centering-font-regexp): New
Kenichi Handa <handa@m17n.org>
parents:
26013
diff
changeset
|
615 (setq vertical-centering-font-regexp |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
616 "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5") |
26886
8a6d8101919e
(vertical-centering-font-regexp): New
Kenichi Handa <handa@m17n.org>
parents:
26013
diff
changeset
|
617 |
50516
125da3e3e9af
Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents:
50257
diff
changeset
|
618 ;; CDAC fonts are actually smaller than their design sizes. |
125da3e3e9af
Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents:
50257
diff
changeset
|
619 (setq face-font-rescale-alist |
125da3e3e9af
Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents:
50257
diff
changeset
|
620 '(("-cdac$" . 1.3))) |
125da3e3e9af
Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents:
50257
diff
changeset
|
621 |
88405 | 622 (defvar x-font-name-charset-alist nil |
623 "This variable has no meaning now. Just kept for backward compatibility.") | |
22161
7a4c3fd89dda
(x-font-name-charset-alist): New
Kenichi Handa <handa@m17n.org>
parents:
22128
diff
changeset
|
624 |
17052 | 625 ;;; XLFD (X Logical Font Description) format handler. |
626 | |
627 ;; Define XLFD's field index numbers. ; field name | |
88405 | 628 (defconst xlfd-regexp-family-subnum 0) ; FOUNDRY and FAMILY |
629 (defconst xlfd-regexp-weight-subnum 1) ; WEIGHT_NAME | |
630 (defconst xlfd-regexp-slant-subnum 2) ; SLANT | |
631 (defconst xlfd-regexp-swidth-subnum 3) ; SETWIDTH_NAME | |
632 (defconst xlfd-regexp-adstyle-subnum 4) ; ADD_STYLE_NAME | |
633 (defconst xlfd-regexp-pixelsize-subnum 5) ; PIXEL_SIZE | |
634 (defconst xlfd-regexp-pointsize-subnum 6) ; POINT_SIZE | |
635 (defconst xlfd-regexp-resx-subnum 7) ; RESOLUTION_X | |
636 (defconst xlfd-regexp-resy-subnum 8) ; RESOLUTION_Y | |
637 (defconst xlfd-regexp-spacing-subnum 8) ; SPACING | |
638 (defconst xlfd-regexp-avgwidth-subnum 10) ; AVERAGE_WIDTH | |
639 (defconst xlfd-regexp-registry-subnum 11) ; REGISTRY and ENCODING | |
17052 | 640 |
641 ;; Regular expression matching against a fontname which conforms to | |
642 ;; XLFD (X Logical Font Description). All fields in XLFD should be | |
643 ;; not be omitted (but can be a wild card) to be matched. | |
644 (defconst xlfd-tight-regexp | |
645 "^\ | |
88405 | 646 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\ |
17052 | 647 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\ |
88405 | 648 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*-[^-]*\\)$") |
649 | |
650 ;; Regular expression matching against a fontname which conforms to | |
651 ;; XLFD (X Logical Font Description). All fields in XLFD from FOUNDRY | |
89274 | 652 ;; to ADSTYLE, REGISTRY, and ENCODING should be not be omitted (but |
88405 | 653 ;; can be a wild card) to be matched. |
654 (defconst xlfd-style-regexp | |
655 "^\ | |
656 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-.*\ | |
657 -\\([^-]*-[^-]*\\)$") | |
17052 | 658 |
659 ;; List of field numbers of XLFD whose values are numeric. | |
660 (defconst xlfd-regexp-numeric-subnums | |
88405 | 661 (list xlfd-regexp-pixelsize-subnum ;5 |
662 xlfd-regexp-pointsize-subnum ;6 | |
663 xlfd-regexp-resx-subnum ;7 | |
664 xlfd-regexp-resy-subnum ;8 | |
665 xlfd-regexp-avgwidth-subnum ;10 | |
17052 | 666 )) |
667 | |
668 (defun x-decompose-font-name (pattern) | |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
669 "Decompose PATTERN into XLFD fields and return a vector of the fields. |
88405 | 670 The length of the vector is 12. |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
671 The FOUNDRY and FAMILY fields are concatinated and stored in the first |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
672 element of the vector. |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
673 The REGISTRY and ENCODING fields are concatinated and stored in the last |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
674 element of the vector. |
23890
fa4839661777
(x-decompose-font-name): If PATTERN
Kenichi Handa <handa@m17n.org>
parents:
23655
diff
changeset
|
675 |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
676 Return nil if PATTERN doesn't conform to XLFD." |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
677 (if (string-match xlfd-tight-regexp pattern) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
678 (let ((xlfd-fields (make-vector 12 nil))) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
679 (dotimes (i 12) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
680 (aset xlfd-fields i (match-string (1+ i) pattern))) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
681 (dotimes (i 12) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
682 (if (string-match "^[*-]+$" (aref xlfd-fields i)) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
683 (aset xlfd-fields i nil))) |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
684 xlfd-fields))) |
17177
9e550b522bc0
(x-charset-registries): Change entry for Ethiopic.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
685 |
22449
c87830c691a5
(instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents:
22161
diff
changeset
|
686 (defun x-compose-font-name (fields &optional reduce) |
89274 | 687 "Compose X fontname from FIELDS. |
90718 | 688 FIELDS is a vector of XLFD fields, of length 12. |
17177
9e550b522bc0
(x-charset-registries): Change entry for Ethiopic.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
689 If a field is nil, wild-card letter `*' is embedded. |
74330
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
690 Optional argument REDUCE exists just for backward compatibility, |
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
691 and is always ignored." |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
692 (concat "-" (mapconcat (lambda (x) (or x "*")) fields "-"))) |
23205
22df54cdb841
(resolved-ascii-font): New variable.
Kenichi Handa <handa@m17n.org>
parents:
23196
diff
changeset
|
693 |
40250
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
694 |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
695 (defun x-must-resolve-font-name (xlfd-fields) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
696 "Like `x-resolve-font-name', but always return a font name. |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
697 XLFD-FIELDS is a vector of XLFD (X Logical Font Description) fields. |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
698 If no font matching XLFD-FIELDS is available, successively replace |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
699 parts of the font name pattern with \"*\" until some font is found. |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
700 Value is name of that font." |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
701 (let ((ascii-font nil) (index 0)) |
88405 | 702 (while (and (null ascii-font) (<= index xlfd-regexp-registry-subnum)) |
40250
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
703 (let ((pattern (x-compose-font-name xlfd-fields))) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
704 (condition-case nil |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
705 (setq ascii-font (x-resolve-font-name pattern)) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
706 (error |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
707 (message "Warning: no fonts matching `%s' available" pattern) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
708 (aset xlfd-fields index "*") |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
709 (setq index (1+ index)))))) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
710 (unless ascii-font |
50581
4daf1ecf4381
(create-fontset-from-ascii-font): Doc fix.
John Paul Wallington <jpw@pobox.com>
parents:
50516
diff
changeset
|
711 (error "No fonts found")) |
40250
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
712 ascii-font)) |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
713 |
4f3033e5b688
(x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents:
38414
diff
changeset
|
714 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
715 (defun x-complement-fontset-spec (default-spec fontlist) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
716 "Complement elements of FONTLIST based on DEFAULT-SPEC. |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
717 DEFAULT-SPEC is a font-spec object providing default font properties. |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
718 FONTLIST is an alist of script names vs the corresponding font names. |
18350
3f4364889538
(x-charset-registries): Name changed for consistency:
Kenichi Handa <handa@m17n.org>
parents:
17989
diff
changeset
|
719 |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
720 The font names are parsed and unspecified font properties are |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
721 given from DEFAULT-SPEC." |
91291
fbd539674745
(x-complement-fontset-spec): Complement size too.
Kenichi Handa <handa@m17n.org>
parents:
91263
diff
changeset
|
722 (let ((prop-list '(:foundry :family :weight :slant :width :adstyle :size))) |
88405 | 723 (dolist (elt fontlist) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
724 (let ((spec (font-spec :name (cadr elt)))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
725 (dolist (prop prop-list) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
726 (let ((val (font-get spec prop))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
727 (or val |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
728 (font-put spec prop (font-get default-spec prop))))) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
729 (setcar (cdr elt) spec))) |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
730 fontlist)) |
17052 | 731 |
19049
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
732 (defun fontset-name-p (fontset) |
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
733 "Return non-nil if FONTSET is valid as fontset name. |
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
734 A valid fontset name should conform to XLFD (X Logical Font Description) |
74330
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
735 with \"fontset\" in `<CHARSET_REGISTRY>' field." |
19049
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
736 (and (string-match xlfd-tight-regexp fontset) |
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
737 (string= (match-string (1+ xlfd-regexp-registry-subnum) fontset) |
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
738 "fontset"))) |
cad4c032fa26
(fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents:
18719
diff
changeset
|
739 |
17052 | 740 (defun generate-fontset-menu () |
89274 | 741 "Return list to be appended to `x-fixed-font-alist'. |
742 Done when `mouse-set-font' is called." | |
89127
3e0204a3fcb8
(generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents:
89004
diff
changeset
|
743 (let (l) |
3e0204a3fcb8
(generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents:
89004
diff
changeset
|
744 (dolist (fontset (fontset-list)) |
3e0204a3fcb8
(generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents:
89004
diff
changeset
|
745 (or (string-match "fontset-default$" fontset) |
3e0204a3fcb8
(generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents:
89004
diff
changeset
|
746 (push (list (fontset-plain-name fontset) fontset) l))) |
24160
ab814ec4995e
(generate-fontset-menu): Return a
Kenichi Handa <handa@m17n.org>
parents:
24153
diff
changeset
|
747 (cons "Fontset" |
89127
3e0204a3fcb8
(generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents:
89004
diff
changeset
|
748 (sort l #'(lambda (x y) (string< (car x) (car y))))))) |
17052 | 749 |
750 (defun fontset-plain-name (fontset) | |
751 "Return a plain and descriptive name of FONTSET." | |
17755
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
752 (if (not (setq fontset (query-fontset fontset))) |
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
753 (error "Invalid fontset: %s" fontset)) |
17052 | 754 (let ((xlfd-fields (x-decompose-font-name fontset))) |
755 (if xlfd-fields | |
89004
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
756 (let ((family (aref xlfd-fields xlfd-regexp-family-subnum)) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
757 (weight (aref xlfd-fields xlfd-regexp-weight-subnum)) |
17052 | 758 (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) |
759 (swidth (aref xlfd-fields xlfd-regexp-swidth-subnum)) | |
760 (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum)) | |
88405 | 761 (nickname (aref xlfd-fields xlfd-regexp-registry-subnum)) |
17052 | 762 name) |
88405 | 763 (if (not (string-match "^fontset-\\(.*\\)$" nickname)) |
89004
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
764 (setq nickname family) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
765 (setq nickname (match-string 1 nickname))) |
90344
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
766 (if (and size (> (string-to-number size) 0)) |
89004
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
767 (setq name (format "%s: %s-dot" nickname size)) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
768 (setq name nickname)) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
769 (and weight |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
770 (cond ((string-match "^medium$" weight) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
771 (setq name (concat name " " "medium"))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
772 ((string-match "^bold$\\|^demibold$" weight) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
773 (setq name (concat name " " weight))))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
774 (and slant |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
775 (cond ((string-match "^i$" slant) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
776 (setq name (concat name " " "italic"))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
777 ((string-match "^o$" slant) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
778 (setq name (concat name " " "slant"))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
779 ((string-match "^ri$" slant) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
780 (setq name (concat name " " "reverse italic"))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
781 ((string-match "^ro$" slant) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
782 (setq name (concat name " " "reverse slant"))))) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
783 name) |
17052 | 784 fontset))) |
785 | |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
786 (defvar charset-script-alist |
89143
7b8bd597892a
(charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents:
89127
diff
changeset
|
787 '((ascii . latin) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
788 (latin-iso8859-1 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
789 (latin-iso8859-2 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
790 (latin-iso8859-3 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
791 (latin-iso8859-4 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
792 (latin-iso8859-9 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
793 (latin-iso8859-10 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
794 (latin-iso8859-13 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
795 (latin-iso8859-14 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
796 (latin-iso8859-15 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
797 (latin-iso8859-16 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
798 (latin-jisx0201 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
799 (thai-tis620 . thai) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
800 (cyrillic-iso8859-5 . cyrillic) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
801 (arabic-iso8859-6 . arabic) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
802 (greek-iso8859-7 . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
803 (hebrew-iso8859-8 . latin) |
89143
7b8bd597892a
(charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents:
89127
diff
changeset
|
804 (katakana-jisx0201 . kana) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
805 (chinese-gb2312 . han) |
90005
0c0b009323eb
(font-encoding-alist): Add gbk.
Kenichi Handa <handa@m17n.org>
parents:
89909
diff
changeset
|
806 (chinese-gbk . han) |
90686
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
807 (gb18030-2-byte . han) |
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
808 (gb18030-4-byte-bmp . han) |
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
809 (gb18030-4-byte-ext-1 . han) |
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
810 (gb18030-4-byte-ext-2 . han) |
5b24bb105d42
(font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents:
90644
diff
changeset
|
811 (gb18030-4-byte-smp . han) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
812 (chinese-big5-1 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
813 (chinese-big5-2 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
814 (chinese-cns11643-1 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
815 (chinese-cns11643-2 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
816 (chinese-cns11643-3 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
817 (chinese-cns11643-4 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
818 (chinese-cns11643-5 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
819 (chinese-cns11643-6 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
820 (chinese-cns11643-7 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
821 (japanese-jisx0208 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
822 (japanese-jisx0208-1978 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
823 (japanese-jisx0212 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
824 (japanese-jisx0213-1 . han) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
825 (japanese-jisx0213-2 . han) |
89143
7b8bd597892a
(charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents:
89127
diff
changeset
|
826 (korean-ksc5601 . hangul) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
827 (chinese-sisheng . bopomofo) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
828 (vietnamese-viscii-lower . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
829 (vietnamese-viscii-upper . latin) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
830 (arabic-digit . arabic) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
831 (arabic-1-column . arabic) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
832 (arabic-2-column . arabic) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
833 (indian-is13194 . devanagari) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
834 (indian-glyph . devanagari) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
835 (indian-1-column . devanagari) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
836 (indian-2-column . devanagari) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
837 (tibetan-1-column . tibetan)) |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
838 "Alist of charsets vs the corresponding most appropriate scripts. |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
839 |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
840 This alist is used by the function `create-fontset-from-fontset-spec' |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
841 to map charsets to scripts.") |
49287
5cb7e7103296
Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents:
47711
diff
changeset
|
842 |
22161
7a4c3fd89dda
(x-font-name-charset-alist): New
Kenichi Handa <handa@m17n.org>
parents:
22128
diff
changeset
|
843 (defun create-fontset-from-fontset-spec (fontset-spec |
22449
c87830c691a5
(instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents:
22161
diff
changeset
|
844 &optional style-variant noerror) |
17052 | 845 "Create a fontset from fontset specification string FONTSET-SPEC. |
846 FONTSET-SPEC is a string of the format: | |
90718 | 847 FONTSET-NAME,SCRIPT0:FONT0,SCRIPT1:FONT1, ... |
17755
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
848 Any number of SPACE, TAB, and NEWLINE can be put before and after commas. |
22449
c87830c691a5
(instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents:
22161
diff
changeset
|
849 |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
850 When a frame uses the fontset as the `font' parameter, the frame's |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
851 default font name is derived from FONTSET-NAME by substituting |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
852 \"iso8859-1\" for the tail part \"fontset-XXX\". But, if SCRIPT-NAMEn |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
853 is \"ascii\", use the corresponding FONT-NAMEn as the default font |
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
854 name. |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
855 |
90718 | 856 Optional 2nd and 3rd arguments exist just for backward compatibility, |
857 and are ignored. | |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
858 |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
859 It returns a name of the created fontset. |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
860 |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
861 For backward compatibility, SCRIPT-NAME may be a charset name, in |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
862 which case, the corresponding script is decided by the variable |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
863 `charset-script-alist' (which see)." |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
864 (or (string-match "^[^,]+" fontset-spec) |
17755
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
865 (error "Invalid fontset spec: %s" fontset-spec)) |
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
866 (let ((idx (match-end 0)) |
4c82e87c7d7c
(x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents:
17339
diff
changeset
|
867 (name (match-string 0 fontset-spec)) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
868 default-spec target script fontlist) |
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
869 (or (string-match xlfd-tight-regexp name) |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
870 (error "Fontset name \"%s\" not conforming to XLFD" name)) |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
871 (setq default-spec (font-spec :name name)) |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
872 ;; At first, extract pairs of charset and fontname from FONTSET-SPEC. |
90348
c98f49021a42
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90344
diff
changeset
|
873 (while (string-match "[, \t\n]*\\([^:]+\\):[ \t]*\\([^,]+\\)" |
c98f49021a42
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90344
diff
changeset
|
874 fontset-spec idx) |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
875 (setq idx (match-end 0)) |
90344
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
876 (setq target (intern (match-string 1 fontset-spec))) |
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
877 (cond ((or (eq target 'ascii) |
90644
9b62e05dedf6
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90592
diff
changeset
|
878 (memq target (char-table-extra-slot char-script-table 0))) |
9b62e05dedf6
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90592
diff
changeset
|
879 (push (list target (match-string 2 fontset-spec)) fontlist)) |
9b62e05dedf6
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90592
diff
changeset
|
880 ((setq script (cdr (assq target charset-script-alist))) |
90344
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
881 (push (list script (match-string 2 fontset-spec)) fontlist)) |
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
882 ((charsetp target) |
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
883 (push (list target (match-string 2 fontset-spec)) fontlist)))) |
22449
c87830c691a5
(instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents:
22161
diff
changeset
|
884 |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
885 ;; Complement FONTLIST. |
91263
a3dec2a13232
(font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents:
91233
diff
changeset
|
886 (setq fontlist (x-complement-fontset-spec default-spec fontlist)) |
22161
7a4c3fd89dda
(x-font-name-charset-alist): New
Kenichi Handa <handa@m17n.org>
parents:
22128
diff
changeset
|
887 |
89357
8f8c7d4c2e6e
Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents:
89325
diff
changeset
|
888 ;; Create a fontset. |
90344
d4661241b1fa
(create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
889 (new-fontset name (nreverse fontlist)))) |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
890 |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
891 (defun create-fontset-from-ascii-font (font &optional resolved-font |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
892 fontset-name) |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
893 "Create a fontset from an ASCII font FONT. |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
894 |
74330
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
895 Optional 2nd arg RESOLVED-FONT is a resolved name of FONT. |
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
896 If omitted, `x-resolve-font-name' is called to get the resolved name. |
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
897 At this time, if FONT is not available, an error is signaled. |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
898 |
74330
5401c4ed263b
(create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents:
74190
diff
changeset
|
899 Optional 3rd arg FONTSET-NAME is a string to be used in |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
900 `<CHARSET_ENCODING>' fields of a new fontset name. If it is omitted, |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
901 an appropriate name is generated automatically. |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
902 |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
903 It returns a name of the created fontset." |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
904 (setq font (downcase font)) |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
905 (setq resolved-font |
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
906 (downcase (or resolved-font (x-resolve-font-name font)))) |
88405 | 907 (let ((xlfd (x-decompose-font-name resolved-font)) |
908 fontset) | |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
909 (if fontset-name |
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
910 (setq fontset-name (downcase fontset-name)) |
89004
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
911 (if (query-fontset "fontset-startup") |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
912 (setq fontset-name |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
913 (subst-char-in-string |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
914 ?- ?_ (aref xlfd xlfd-regexp-registry-subnum) t)) |
fbd881940a45
(fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents:
88893
diff
changeset
|
915 (setq fontset-name "startup"))) |
88405 | 916 (aset xlfd xlfd-regexp-registry-subnum |
917 (format "fontset-%s" fontset-name)) | |
22672
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
918 (setq fontset (x-compose-font-name xlfd)) |
9cfa1a788a5a
(create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents:
22618
diff
changeset
|
919 (or (query-fontset fontset) |
28215
ceaded4c2cb9
(x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents:
27534
diff
changeset
|
920 (create-fontset-from-fontset-spec (concat fontset ", ascii:" font))))) |
22161
7a4c3fd89dda
(x-font-name-charset-alist): New
Kenichi Handa <handa@m17n.org>
parents:
22128
diff
changeset
|
921 |
17052 | 922 |
17842
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
923 ;; Create standard fontset from 16 dots fonts which are the most widely |
17989
8a264cfe3768
(x-complement-fontset-spec): Add font names which are
Kenichi Handa <handa@m17n.org>
parents:
17842
diff
changeset
|
924 ;; installed fonts. Fonts for Chinese-GB, Korean, and Chinese-CNS are |
8a264cfe3768
(x-complement-fontset-spec): Add font names which are
Kenichi Handa <handa@m17n.org>
parents:
17842
diff
changeset
|
925 ;; specified here because FAMILY of those fonts are not "fixed" in |
8a264cfe3768
(x-complement-fontset-spec): Add font names which are
Kenichi Handa <handa@m17n.org>
parents:
17842
diff
changeset
|
926 ;; many cases. |
17842
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
927 (defvar standard-fontset-spec |
88405 | 928 (purecopy "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard") |
17842
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
929 "String of fontset spec of the standard fontset. |
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
930 You have the biggest chance to display international characters |
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
931 with correct glyphs by using the standard fontset. |
17052 | 932 See the documentation of `create-fontset-from-fontset-spec' for the format.") |
933 | |
88893
86354924a790
Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents:
88694
diff
changeset
|
934 |
17052 | 935 ;; Create fontsets from X resources of the name `fontset-N (class |
936 ;; Fontset-N)' where N is integer 0, 1, ... | |
937 ;; The values of the resources the string of the same format as | |
17842
cb1af8ead3df
(standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents:
17755
diff
changeset
|
938 ;; `standard-fontset-spec'. |
17052 | 939 |
940 (defun create-fontset-from-x-resource () | |
941 (let ((idx 0) | |
942 fontset-spec) | |
27534
eeb998860456
(standard-fontset-spec): Purecopy it.
Dave Love <fx@gnu.org>
parents:
26886
diff
changeset
|
943 (while (setq fontset-spec (x-get-resource (format "fontset-%d" idx) |
eeb998860456
(standard-fontset-spec): Purecopy it.
Dave Love <fx@gnu.org>
parents:
26886
diff
changeset
|
944 (format "Fontset-%d" idx))) |
93576
ed9ff03f156c
(create-fontset-from-x-resource):
Kenichi Handa <handa@m17n.org>
parents:
93516
diff
changeset
|
945 (condition-case nil |
ed9ff03f156c
(create-fontset-from-x-resource):
Kenichi Handa <handa@m17n.org>
parents:
93516
diff
changeset
|
946 (create-fontset-from-fontset-spec fontset-spec t 'noerror) |
ed9ff03f156c
(create-fontset-from-x-resource):
Kenichi Handa <handa@m17n.org>
parents:
93516
diff
changeset
|
947 (error (message "Fontset-%d: invalid specification in X resource" idx))) |
17052 | 948 (setq idx (1+ idx))))) |
949 | |
950 ;; | |
951 (provide 'fontset) | |
952 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93576
diff
changeset
|
953 ;; arch-tag: bb53e629-0234-403c-950e-551e61554849 |
17052 | 954 ;;; fontset.el ends here |