annotate lisp/international/fontset.el @ 109992:640cdeb464c1

Improvements to describe-package buffer. * lisp/help.el (help-map): Bind `C-h P' to describe-package. * lisp/menu-bar.el (menu-bar-describe-menu): Add describe-package. * lisp/emacs-lisp/package.el (package-refresh-contents): Catch errors when downloading archives. (describe-package-1): Add package commentary. (package-install-button-action): New function. (package-menu-mode-map): Bind ? to package-menu-describe-package. (package-menu-view-commentary): Function removed. (package-list-packages-internal): Hide the `package' package too.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 25 Aug 2010 23:31:34 -0400
parents 92cc550cda9a
children b8fde5ef9e14
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
74544
43cc94d955c2 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74330
diff changeset
3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 106761
diff changeset
4 ;; 2005, 2006, 2007, 2008, 2009, 2010 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,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 106761
diff changeset
6 ;; 2005, 2006, 2007, 2008, 2009, 2010
62274
c36561fe0657 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
c36561fe0657 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
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
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
10 ;; National Institute of Advanced Industrial Science and Technology (AIST)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
11 ;; Registration Number H13PRO009
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
13 ;; Keywords: mule, i18n, fontset
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
21
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
22 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
23 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
25 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
26
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
32 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
105798
0ad1fc06bfc8 * puresize.h (BASE_PURESIZE): Increase to 1470000.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105424
diff changeset
37 (mapcar (lambda (arg)
0ad1fc06bfc8 * puresize.h (BASE_PURESIZE): Increase to 1470000.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105424
diff changeset
38 (cons (purecopy (car arg)) (cdr arg)))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
39 '(("iso8859-1$" . iso-8859-1)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
40 ("iso8859-2$" . iso-8859-2)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
41 ("iso8859-3$" . iso-8859-3)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
42 ("iso8859-4$" . iso-8859-4)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
43 ("iso8859-5$" . iso-8859-5)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
44 ("iso8859-6$" . iso-8859-6)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
45 ("iso8859-7$" . iso-8859-7)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
46 ("iso8859-8$" . iso-8859-8)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
47 ("iso8859-9$" . iso-8859-9)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
48 ("iso8859-10$" . iso-8859-10)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
49 ("iso8859-11$" . iso-8859-11)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
50 ("iso8859-13$" . iso-8859-13)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
51 ("iso8859-14$" . iso-8859-14)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
52 ("iso8859-15$" . iso-8859-15)
91330
48e4aecfcc5e (font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents: 91327
diff changeset
53 ("iso8859-16$" . iso-8859-16)
95696
4c19ce1f7aab (font-encoding-alist): Add an entry for "ascii-0".
Kenichi Handa <handa@m17n.org>
parents: 95173
diff changeset
54 ("ascii-0$" . ascii)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
55 ("gb2312.1980" . chinese-gb2312)
90005
0c0b009323eb (font-encoding-alist): Add gbk.
Kenichi Handa <handa@m17n.org>
parents: 89909
diff changeset
56 ("gbk" . chinese-gbk)
91325
ff65e30f34e2 (font-encoding-alist): Don't set the
Kenichi Handa <handa@m17n.org>
parents: 91300
diff changeset
57 ("gb18030" . (unicode . nil))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
58 ("jisx0208.1978" . japanese-jisx0208-1978)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
59 ("jisx0208" . japanese-jisx0208)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
60 ("jisx0201" . jisx0201)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
61 ("jisx0212" . japanese-jisx0212)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
62 ("ksc5601.1987" . korean-ksc5601)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
63 ("cns11643.1992.*1" . chinese-cns11643-1)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
64 ("cns11643.1992.*2" . chinese-cns11643-2)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
65 ("cns11643.1992.*3" . chinese-cns11643-3)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
66 ("cns11643.1992.*4" . chinese-cns11643-4)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
67 ("cns11643.1992.*5" . chinese-cns11643-5)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
68 ("cns11643.1992.*6" . chinese-cns11643-6)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
69 ("cns11643.1992.*7" . chinese-cns11643-7)
89809
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
70 ("cns11643.92p1-0" . chinese-cns11643-1)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
71 ("cns11643.92p2-0" . chinese-cns11643-2)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
72 ("cns11643.92p3-0" . chinese-cns11643-3)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
73 ("cns11643.92p4-0" . chinese-cns11643-4)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
74 ("cns11643.92p5-0" . chinese-cns11643-5)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
75 ("cns11643.92p6-0" . chinese-cns11643-6)
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
76 ("cns11643.92p7-0" . chinese-cns11643-7)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
77 ("big5" . big5)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
78 ("viscii" . viscii)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
79 ("tis620" . tis620-2533)
90091
4a0f91659a65 (font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents: 90005
diff changeset
80 ("microsoft-cp1251" . windows-1251)
90420
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
81 ("koi8-r" . koi8-r)
91233
4fdf769f4c0b (font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents: 91195
diff changeset
82 ("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
83 ("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
84 ("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
85 ("iso10646-1$" . (unicode-bmp . nil))
4fdf769f4c0b (font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents: 91195
diff changeset
86 ("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
87 ("unicode-bmp" . (unicode-bmp . nil))
4fdf769f4c0b (font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents: 91195
diff changeset
88 ("abobe-symbol" . symbol)
4fdf769f4c0b (font-encoding-alist): Add the entry of "unicode-bmp".
Kenichi Handa <handa@m17n.org>
parents: 91195
diff changeset
89 ("sisheng_cwnn" . chinese-sisheng)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
90 ("mulearabic-0" . arabic-digit)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
91 ("mulearabic-1" . arabic-1-column)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
92 ("mulearabic-2" . arabic-2-column)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
93 ("muleipa" . ipa)
90504
8de7c6bf6944 (font-encoding-alist): Fix for
Kenichi Handa <handa@m17n.org>
parents: 90493
diff changeset
94 ("ethiopic-unicode" . (unicode-bmp . ethiopic))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
95 ("is13194-devanagari" . indian-is13194)
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
96 ("Devanagari-CDAC" . devanagari-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
97 ("Sanskrit-CDAC" . sanskrit-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
98 ("Bengali-CDAC" . bengali-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
99 ("Assamese-CDAC" . assamese-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
100 ("Punjabi-CDAC" . punjabi-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
101 ("Gujarati-CDAC" . gujarati-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
102 ("Oriya-CDAC" . oriya-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
103 ("Tamil-CDAC" . tamil-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
104 ("Telugu-CDAC" . telugu-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
105 ("Kannada-CDAC" . kannada-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
106 ("Malayalam-CDAC" . malayalam-cdac)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
107 ("Devanagari-Akruti" . devanagari-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
108 ("Bengali-Akruti" . bengali-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
109 ("Punjabi-Akruti" . punjabi-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
110 ("Gujarati-Akruti" . gujarati-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
111 ("Oriya-Akruti" . oriya-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
112 ("Tamil-Akruti" . tamil-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
113 ("Telugu-Akruti" . telugu-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
114 ("Kannada-Akruti" . kannada-akruti)
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
115 ("Malayalam-Akruti" . malayalam-akruti)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
116 ("muleindian-2" . indian-2-column)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
117 ("muleindian-1" . indian-1-column)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
118 ("mulelao-1" . mule-lao)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
119 ("muletibetan-2" . tibetan)
102707
739d433c2446 (font-encoding-alist): Add an entry for muletibetan-0.
Kenichi Handa <handa@m17n.org>
parents: 102638
diff changeset
120 ("muletibetan-0" . tibetan)
105798
0ad1fc06bfc8 * puresize.h (BASE_PURESIZE): Increase to 1470000.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105424
diff changeset
121 ("muletibetan-1" . tibetan-1-column))))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
122
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
123 (defvar font-encoding-charset-alist)
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
124
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
125 (setq font-encoding-charset-alist
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
126 '((latin-iso8859-1 . iso-8859-1)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
127 (latin-iso8859-2 . iso-8859-2)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
128 (latin-iso8859-3 . iso-8859-3)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
129 (latin-iso8859-4 . iso-8859-4)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
130 (latin-iso8859-9 . iso-8859-9)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
131 (latin-iso8859-10 . iso-8859-10)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
132 (latin-iso8859-13 . iso-8859-13)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
133 (latin-iso8859-14 . iso-8859-14)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
134 (latin-iso8859-15 . iso-8859-15)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
135 (latin-iso8859-16 . iso-8859-16)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
136 (cyrillic-iso8859-5 . iso-8859-5)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
137 (greek-iso8859-7 . iso-8859-7)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
138 (arabic-iso8859-6 . iso-8859-6)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
139 (thai-tis620 . tis620-2533)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
140 (latin-jisx0201 . jisx0201)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
141 (katakana-jisx0201 . jisx0201)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
142 (chinese-big5-1 . big5)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
143 (chinese-big5-2 . big5)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
144 (vietnamese-viscii-lower . viscii)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
145 (vietnamese-viscii-upper . viscii)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
146 (tibetan . unicode-bmp)))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
147
90420
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
148 (setq script-representative-chars
95173
aa6446d89833 (script-representative-chars): Add more
Kenichi Handa <handa@m17n.org>
parents: 94954
diff changeset
149 '((latin ?A ?Z ?a ?z #x00C0 #x0100 #x0180 #x1e00)
aa6446d89833 (script-representative-chars): Add more
Kenichi Handa <handa@m17n.org>
parents: 94954
diff changeset
150 (phonetic #x250 #x283)
90493
c5c4ee67b82e (script-representative-chars): Add an
Kenichi Handa <handa@m17n.org>
parents: 90420
diff changeset
151 (greek #x3A9)
90420
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
152 (coptic #x3E2)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
153 (cyrillic #x42F)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
154 (armenian #x531)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
155 (hebrew #x5D0)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
156 (arabic #x628)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
157 (syriac #x710)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
158 (thaana #x78C)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
159 (devanagari #x915)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
160 (bengali #x995)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
161 (gurmukhi #xA15)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
162 (gujarati #xA95)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
163 (oriya #xB15)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
164 (tamil #xB95)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
165 (telugu #xC15)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
166 (kannada #xC95)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
167 (malayalam #xD15)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
168 (sinhala #xD95)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
169 (thai #xE17)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
170 (lao #xEA5)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
171 (tibetan #xF40)
107307
b1fd8a6d130f Change "myanmar" to "burmese"
Kenichi Handa <handa@m17n.org>
parents: 107237
diff changeset
172 (burmese #x1000)
90420
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
173 (georgian #x10D3)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
174 (ethiopic #x1208)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
175 (cherokee #x13B6)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
176 (canadian-aboriginal #x14C0)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
177 (ogham #x168F)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
178 (runic #x16A0)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
179 (khmer #x1780)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
180 (mongolian #x1826)
97906
bfd2584c2f7a (script-representative-chars): Re-add
Kenichi Handa <handa@m17n.org>
parents: 97843
diff changeset
181 (symbol . [#x201C #x2200 #x2500])
90420
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
182 (braille #x2800)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
183 (ideographic-description #x2FF0)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
184 (cjk-misc #x300E)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
185 (kana #x304B)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
186 (bopomofo #x3105)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
187 (kanbun #x319D)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
188 (han #x5B57)
8a1866284f74 (font-encoding-alist): Add koi8-4.
Kenichi Handa <handa@m17n.org>
parents: 90348
diff changeset
189 (yi #xA288)
91358
65fc7a40f435 (script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents: 91330
diff changeset
190 (cham #xAA00)
65fc7a40f435 (script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents: 91330
diff changeset
191 (tai-viet #xAA80)
100494
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
192 (hangul #xAC00)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
193 (linear-b #x10000)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
194 (aegean-number #x10100)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
195 (ancient-greek-number #x10140)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
196 (ancient-symbol #x10190)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
197 (phaistos-disc #x101D0)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
198 (lycian #x10280)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
199 (carian #x102A0)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
200 (olt-italic #x10300)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
201 (ugaritic #x10380)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
202 (old-persian #x103A0)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
203 (deseret #x10400)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
204 (shavian #x10450)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
205 (osmanya #x10480)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
206 (cypriot-syllabary #x10800)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
207 (phoenician #x10900)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
208 (lydian #x10920)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
209 (kharoshthi #x10A00)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
210 (cuneiform #x12000)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
211 (cuneiform-numbers-and-punctuation #x12400)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
212 (byzantine-musical-symbol #x1D000)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
213 (musical-symbol #x1D100)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
214 (ancient-greek-musical-notation #x1D200)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
215 (tai-xuan-jing-symbol #x1D300)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
216 (counting-rod-numeral #x1D360)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
217 (mahjong-tile #x1F000)
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
218 (domino-tile #x1F030)))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
219
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
220 (defvar otf-script-alist)
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
221
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
222 (setq otf-script-alist
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
223 '((arab . arabic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
224 (armn . armenian)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
225 (bali . balinese)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
226 (beng . bengali)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
227 (bopo . bopomofo)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
228 (brai . braille)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
229 (bugi . buginese)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
230 (buhd . buhid)
90592
d9cb37754a26 (otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents: 90512
diff changeset
231 (byzm . byzantine-musical-symbol)
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
232 (cans . canadian-aboriginal)
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
233 (cher . cherokee)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
234 (copt . coptic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
235 (xsux . cuneiform)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
236 (cyrl . cyrillic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
237 (cprt . cypriot)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
238 (dsrt . deseret)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
239 (deva . devanagari)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
240 (ethi . ethiopic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
241 (geor . georgian)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
242 (glag . glagolitic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
243 (goth . gothic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
244 (grek . greek)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
245 (gujr . gujarati)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
246 (guru . gurmukhi)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
247 (hani . han)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
248 (hang . hangul)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
249 (hano . hanunoo)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
250 (hebr . hebrew)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
251 (kana . kana)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
252 (knda . kannada)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
253 (khar . kharoshthi)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
254 (khmr . khmer)
91156
d5ce4acff895 (otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents: 90996
diff changeset
255 (lao\ . lao)
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
256 (latn . latin)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
257 (limb . limbu)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
258 (linb . linear_b)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
259 (mlym . malayalam)
90592
d9cb37754a26 (otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents: 90512
diff changeset
260 (math . mathematical)
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
261 (mong . mongolian)
90592
d9cb37754a26 (otf-script-alist): Add byzm, math,
Kenichi Handa <handa@m17n.org>
parents: 90512
diff changeset
262 (musc . musical-symbol)
107307
b1fd8a6d130f Change "myanmar" to "burmese"
Kenichi Handa <handa@m17n.org>
parents: 107237
diff changeset
263 (mymr . burmese)
91156
d5ce4acff895 (otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents: 90996
diff changeset
264 (nko\ . nko)
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
265 (ogam . ogham)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
266 (ital . old_italic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
267 (xpeo . old_persian)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
268 (orya . oriya)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
269 (osma . osmanya)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
270 (phag . phags-pa)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
271 (phnx . phoenician)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
272 (runr . runic)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
273 (shaw . shavian)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
274 (sinh . sinhala)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
275 (sylo . syloti_nagri)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
276 (syrc . syriac)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
277 (tglg . tagalog)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
278 (tagb . tagbanwa)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
279 (taml . tamil)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
280 (tale . tai_le)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
281 (telu . telugu)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
282 (thaa . thaana)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
283 (thai . thai)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
284 (tibt . tibetan)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
285 (tfng . tifinagh)
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
286 (ugar . ugaritic)
91156
d5ce4acff895 (otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents: 90996
diff changeset
287 (yi\ \ . yi)))
90512
fb8ab271951f (otf-script-alist): Set it.
Kenichi Handa <handa@m17n.org>
parents: 90504
diff changeset
288
29234
c9a5f356fe77 Set family names of non-latin charsets in default fontset to "*".
Kenichi Handa <handa@m17n.org>
parents: 29168
diff changeset
289 ;; 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
290 ;; 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
291 ;; 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
292 ;; FONT-SPEC is:
91165
3f9bb85be0a4 (x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents: 91156
diff changeset
293 ;; a cons (FAMILY . REGISTRY),
3f9bb85be0a4 (x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents: 91156
diff changeset
294 ;; or a string FONT-NAME,
3f9bb85be0a4 (x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents: 91156
diff changeset
295 ;; or an object created by `font-spec'.
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
296 ;;
105424
098f8a47a308 Fix typos in comments.
Juanma Barranquero <lekktu@gmail.com>
parents: 104630
diff changeset
297 ;; FAMILY may be nil, in which case, the corresponding name of
91165
3f9bb85be0a4 (x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents: 91156
diff changeset
298 ;; 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
299 ;; 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
300 ;; 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
301 ;; does not contain `-', the whole string is embedded in
3f9bb85be0a4 (x-complement-fontset-spec): Use
Kenichi Handa <handa@m17n.org>
parents: 91156
diff changeset
302 ;; `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
303 ;; in `CHARSET_ENCODING' field.
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
304 ;;
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
305 ;; 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
306 ;; `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
307 ;; of characters.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
308
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
309 (declare-function new-fontset "fontset.c" (name fontlist))
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
310 (declare-function set-fontset-font "fontset.c"
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
311 (name target font-spec &optional frame add))
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
312
104630
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
313 (eval-when-compile
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
314
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
315 ;; Build a data to initialize the default fontset at compile time to
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
316 ;; avoid loading charsets that won't be necessary at runtime.
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
317
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
318 ;; The value is (CJK-REGISTRY-VECTOR TARGET-SPEC ...), where
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
319 ;; CJK-REGISTRY-VECTOR is ["JISX0208.1983-0" "GB2312.1980-0" ...],
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
320 ;; TARGET-SPEC is (TARGET . BITMASK) or (TARGET SPEC ...),
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
321 ;; TARGET is CHAR or (FROM-CHAR . TO-CHAR),
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
322 ;; BITMASK is a bitmask of indices to CJK-REGISTRY-VECTOR,
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
323 ;; SPEC is a list of arguments to font-spec.
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
324
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
325 (defmacro build-default-fontset-data ()
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
326 (let* (;; CHARSET-REGISTRY CHARSET FROM-CODE TO-CODE
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
327 (cjk '(("JISX0208.1983-0" japanese-jisx0208 #x2121 #x287E)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
328 ("GB2312.1980-0" chinese-gb2312 #x2121 #x297E)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
329 ("BIG5-0" big5 #xA140 #xA3FE)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
330 ("CNS11643.1992-1" chinese-cns11643-1 #x2121 #x427E)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
331 ("KSC5601.1987-0" korean-ksc5601 #x2121 #x2C7E)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
332 (scripts '((tibetan
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
333 (:registry "iso10646-1" :otf (tibt nil (ccmp blws abvs)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
334 (:family "mtib" :registry "iso10646-1")
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
335 (:registry "muletibetan-2"))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
336 (ethiopic
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
337 (:registry "iso10646-1" :script ethiopic)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
338 (:registry "ethiopic-unicode"))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
339 (phonetic
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
340 (:registry "iso10646-1" :script phonetic)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
341 (:registry "MuleIPA-1")
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
342 (:registry "iso10646-1"))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
343 (cjk-table (make-char-table nil))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
344 (script-coverage
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
345 #'(lambda (script)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
346 (let ((coverage))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
347 (map-char-table
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
348 #'(lambda (range val)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
349 (when (eq val script)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
350 (if (consp range)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
351 (setq range (cons (car range) (cdr range))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
352 (push range coverage)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
353 char-script-table)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
354 coverage)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
355 (data (list (vconcat (mapcar 'car cjk))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
356 (i 0))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
357 (dolist (elt cjk)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
358 (let ((mask (lsh 1 i)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
359 (map-charset-chars
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
360 #'(lambda (range arg)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
361 (let ((from (car range)) (to (cdr range)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
362 (if (< to #x110000)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
363 (while (<= from to)
106761
8e1704b5a4b3 international/fontset.el (build-default-fontset-data): Exclude characters in scripts kana, hangul, han, or cjk-misc.
Kenichi Handa <handa@m17n.org>
parents: 105870
diff changeset
364 (or (memq (aref char-script-table from)
8e1704b5a4b3 international/fontset.el (build-default-fontset-data): Exclude characters in scripts kana, hangul, han, or cjk-misc.
Kenichi Handa <handa@m17n.org>
parents: 105870
diff changeset
365 '(kana hangul han cjk-misc))
8e1704b5a4b3 international/fontset.el (build-default-fontset-data): Exclude characters in scripts kana, hangul, han, or cjk-misc.
Kenichi Handa <handa@m17n.org>
parents: 105870
diff changeset
366 (aset cjk-table from
8e1704b5a4b3 international/fontset.el (build-default-fontset-data): Exclude characters in scripts kana, hangul, han, or cjk-misc.
Kenichi Handa <handa@m17n.org>
parents: 105870
diff changeset
367 (logior (or (aref cjk-table from) 0) mask)))
104630
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
368 (setq from (1+ from))))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
369 (nth 1 elt) nil (nth 2 elt) (nth 3 elt)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
370 (setq i (1+ i)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
371 (map-char-table
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
372 #'(lambda (range val)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
373 (if (consp range)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
374 (setq range (cons (car range) (cdr range))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
375 (push (cons range val) data))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
376 cjk-table)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
377 (dolist (script scripts)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
378 (dolist (range (funcall script-coverage (car script)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
379 (push (cons range (cdr script)) data)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
380 `(quote ,(nreverse data))))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
381 )
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
382
49287
5cb7e7103296 Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents: 47711
diff changeset
383 (defun setup-default-fontset ()
5cb7e7103296 Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents: 47711
diff changeset
384 "Setup the default fontset."
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
385 (new-fontset
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
386 "fontset-default"
91156
d5ce4acff895 (otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents: 90996
diff changeset
387 `(;; for each script
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
388 (latin (nil . "ISO8859-1")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
389 (nil . "ISO8859-2")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
390 (nil . "ISO8859-3")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
391 (nil . "ISO8859-4")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
392 (nil . "ISO8859-9")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
393 (nil . "ISO8859-10")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
394 (nil . "ISO8859-13")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
395 (nil . "ISO8859-14")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
396 (nil . "ISO8859-15")
91330
48e4aecfcc5e (font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents: 91327
diff changeset
397 (nil . "ISO8859-16")
91358
65fc7a40f435 (script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents: 91330
diff changeset
398 (nil . "VISCII1.1-1")
96089
67f05963ef0d (setup-default-fontset): Specify script for latin use of iso10646-1.
Jason Rumney <jasonr@gnu.org>
parents: 95841
diff changeset
399 ,(font-spec :registry "iso10646-1" :script 'latin))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
400
103483
3ea8618b4433 * international/fontset.el (setup-default-fontset):
Juanma Barranquero <lekktu@gmail.com>
parents: 103481
diff changeset
401 (thai ,(font-spec :registry "iso10646-1" :otf '(thai nil nil (mark)))
3ea8618b4433 * international/fontset.el (setup-default-fontset):
Juanma Barranquero <lekktu@gmail.com>
parents: 103481
diff changeset
402 ,(font-spec :registry "iso10646-1" :script 'thai)
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
403 (nil . "TIS620*")
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
404 (nil . "ISO8859-11"))
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
405
91156
d5ce4acff895 (otf-script-alist): Make all otf tags
Kenichi Handa <handa@m17n.org>
parents: 90996
diff changeset
406 (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
407 (nil . "iso10646.indian-1"))
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
408 (bengali ,(font-spec :registry "iso10646-1" :otf '(beng nil (rphf))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
409 (gurmukhi ,(font-spec :registry "iso10646-1" :otf '(guru nil (blwf))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
410 (gujarati ,(font-spec :registry "iso10646-1" :otf '(gujr nil (rphf))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
411 (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
412 (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
413 (telugu ,(font-spec :registry "iso10646-1" :otf '(telu nil (blwf))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
414 (kannada ,(font-spec :registry "iso10646-1" :otf '(knda nil (rphf))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
415 (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
416 (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn))))
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
417
107308
e2efddfebd89 from trunk
Kenichi Handa <handa@m17n.org>
parents: 107307 107248
diff changeset
418 (burmese ,(font-spec :registry "iso10646-1" :otf '(mymr nil nil))
107307
b1fd8a6d130f Change "myanmar" to "burmese"
Kenichi Handa <handa@m17n.org>
parents: 107237
diff changeset
419 ,(font-spec :registry "iso10646-1" :script 'burmese))
107237
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
420
91300
3f8bf669d610 (setup-default-fontset): Fix lao OTF script name.
Kenichi Handa <handa@m17n.org>
parents: 91291
diff changeset
421 (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
422 ,(font-spec :registry "iso10646-1" :script 'lao)
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
423 (nil . "MuleLao-1"))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
424
90946
2943395de0ab (setup-default-fontset): Add tai-viet.
Kenichi Handa <handa@m17n.org>
parents: 90737
diff changeset
425 (tai-viet ("TaiViet" . "iso10646-1"))
2943395de0ab (setup-default-fontset): Add tai-viet.
Kenichi Handa <handa@m17n.org>
parents: 90737
diff changeset
426
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
427 (greek ,(font-spec :registry "iso10646-1" :script 'greek)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
428 (nil . "ISO8859-7"))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
429
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
430 (cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
431 (nil . "ISO8859-5")
90091
4a0f91659a65 (font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents: 90005
diff changeset
432 (nil . "microsoft-cp1251")
4a0f91659a65 (font-encoding-alist): Add an entry for
Kenichi Handa <handa@m17n.org>
parents: 90005
diff changeset
433 (nil . "koi8-r"))
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
434
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
435 (arabic ,(font-spec :registry "iso10646-1"
109984
92cc550cda9a Add Arabic support.
Kenichi Handa <handa@m17n.org>
parents: 107308
diff changeset
436 :otf '(arab nil (init medi fina liga)))
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
437 (nil . "MuleArabic-0")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
438 (nil . "MuleArabic-1")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
439 (nil . "MuleArabic-2")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
440 (nil . "ISO8859-6"))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
441
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
442 (hebrew ,(font-spec :registry "iso10646-1" :script 'hebrew)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
443 (nil . "ISO8859-8"))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
444
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
445 (khmer ,(font-spec :registry "iso10646-1" :otf '(khmr nil (pres))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
446
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
447 (kana (nil . "JISX0208*")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
448 (nil . "GB2312.1980-0")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
449 (nil . "KSC5601.1987*")
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
450 (nil . "JISX0201*")
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
451 (nil . "JISX0213.2000-1")
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
452 (nil . "JISX0213.2004-1")
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
453 ,(font-spec :registry "iso10646-1" :script 'kana))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
454
93516
664f1bc28031 (setup-default-fontset): Use unicode fonts that cover bopomofo
Jason Rumney <jasonr@gnu.org>
parents: 92181
diff changeset
455 (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
456 (nil . "sisheng_cwnn-0"))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
457
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
458 (han (nil . "GB2312.1980-0")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
459 (nil . "JISX0208*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
460 (nil . "JISX0212*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
461 (nil . "big5*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
462 (nil . "KSC5601.1987*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
463 (nil . "CNS11643.1992-1")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
464 (nil . "CNS11643.1992-2")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
465 (nil . "CNS11643.1992-3")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
466 (nil . "CNS11643.1992-4")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
467 (nil . "CNS11643.1992-5")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
468 (nil . "CNS11643.1992-6")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
469 (nil . "CNS11643.1992-7")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
470 (nil . "gbk-0")
90686
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
471 (nil . "gb18030")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
472 (nil . "JISX0213.2000-1")
89800
6458a4233000 (setup-default-fontset): Register "JISX0213.2004-1".
Kenichi Handa <handa@m17n.org>
parents: 89636
diff changeset
473 (nil . "JISX0213.2000-2")
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
474 (nil . "JISX0213.2004-1")
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
475 ,(font-spec :registry "iso10646-1" :lang 'ja)
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
476 ,(font-spec :registry "iso10646-1" :lang 'zh))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
477
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
478 (cjk-misc (nil . "GB2312.1980-0")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
479 (nil . "JISX0208*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
480 (nil . "JISX0212*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
481 (nil . "big5*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
482 (nil . "KSC5601.1987*")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
483 (nil . "CNS11643.1992-1")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
484 (nil . "CNS11643.1992-2")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
485 (nil . "CNS11643.1992-3")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
486 (nil . "CNS11643.1992-4")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
487 (nil . "CNS11643.1992-5")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
488 (nil . "CNS11643.1992-6")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
489 (nil . "CNS11643.1992-7")
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
490 (nil . "gbk-0")
90686
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
491 (nil . "gb18030")
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
492 (nil . "JISX0213.2000-1")
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
493 (nil . "JISX0213.2000-2")
96089
67f05963ef0d (setup-default-fontset): Specify script for latin use of iso10646-1.
Jason Rumney <jasonr@gnu.org>
parents: 95841
diff changeset
494 ,(font-spec :registry "iso10646-1" :lang 'ja)
67f05963ef0d (setup-default-fontset): Specify script for latin use of iso10646-1.
Jason Rumney <jasonr@gnu.org>
parents: 95841
diff changeset
495 ,(font-spec :registry "iso10646-1" :lang 'zh))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
496
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
497 (hangul (nil . "KSC5601.1987-0")
96089
67f05963ef0d (setup-default-fontset): Specify script for latin use of iso10646-1.
Jason Rumney <jasonr@gnu.org>
parents: 95841
diff changeset
498 ,(font-spec :registry "iso10646-1" :lang 'ko))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
499
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
500 ;; for each charset
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
501 (ascii (nil . "ISO8859-1"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
502 (arabic-digit ("*" . "MuleArabic-0"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
503 (arabic-1-column ("*" . "MuleArabic-1"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
504 (arabic-2-column ("*" . "MuleArabic-2"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
505 (indian-is13194 (nil . "is13194-devanagari"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
506 (indian-1-column ("*" . "muleindian-2"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
507 ;; Indian CDAC
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
508 (devanagari-cdac (nil . "Devanagari-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
509 (sanskrit-cdac (nil . "Sanskrit-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
510 (bengali-cdac (nil . "Bengali-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
511 (assamese-cdac (nil . "Assamese-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
512 (punjabi-cdac (nil . "Punjabi-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
513 (gujarati-cdac (nil . "Gujarati-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
514 (oriya-cdac (nil . "Oriya-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
515 (tamil-cdac (nil . "Tamil-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
516 (telugu-cdac (nil . "Telugu-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
517 (kannada-cdac (nil . "Kannada-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
518 (malayalam-cdac (nil . "Malayalam-CDAC"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
519 ;; Indian AKRUTI
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
520 (devanagari-akruti (nil . "Devanagari-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
521 (bengali-akruti (nil . "Bengali-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
522 (punjabi-akruti (nil . "Punjabi-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
523 (gujarati-akruti (nil . "Gujarati-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
524 (oriya-akruti (nil . "Oriya-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
525 (tamil-akruti (nil . "Tamil-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
526 (telugu-akruti (nil . "Telugu-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
527 (kannada-akruti (nil . "Kannada-Akruti"))
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
528 (malayalam-akruti (nil . "Malayalam-Akruti"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
529
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
530 ;; Fallback fonts
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
531 (nil (nil . "gb2312.1980")
90686
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
532 (nil . "gbk-0")
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
533 (nil . "gb18030")
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
534 (nil . "jisx0208")
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
535 (nil . "ksc5601.1987")
89809
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
536 (nil . "CNS11643.1992-1")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
537 (nil . "CNS11643.1992-2")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
538 (nil . "CNS11643.1992-3")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
539 (nil . "CNS11643.1992-4")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
540 (nil . "CNS11643.1992-5")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
541 (nil . "CNS11643.1992-6")
c03a2732d0fd (font-encoding-alist): Add entries for
Kenichi Handa <handa@m17n.org>
parents: 89806
diff changeset
542 (nil . "CNS11643.1992-7")
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
543 (nil . "big5")
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
544 (nil . "jisx0213.2000-1")
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
545 (nil . "jisx0213.2004-1")
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
546 (nil . "jisx0212"))
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
547 ))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
548
100494
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
549 ;; For simple scripts
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
550 (dolist (script '(phonetic
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
551 armenian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
552 syriac
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
553 thaana
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
554 georgian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
555 cherokee
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
556 canadian-aboriginal
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
557 ogham
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
558 runic
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
559 symbol
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
560 braille
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
561 yi
101120
c7a080d2d889 * international/fontset.el (create-fontset-from-fontset-spec): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents: 100908
diff changeset
562 aegean-number
100494
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
563 ancient-greek-number
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
564 ancient-symbol
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
565 phaistos-disc
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
566 lycian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
567 carian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
568 olt-italic
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
569 ugaritic
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
570 old-persian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
571 deseret
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
572 shavian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
573 osmanya
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
574 cypriot-syllabary
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
575 phoenician
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
576 lydian
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
577 kharoshthi
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
578 cuneiform
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
579 cuneiform-numbers-and-punctuation
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
580 byzantine-musical-symbol
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
581 musical-symbol
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
582 ancient-greek-musical-notation
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
583 tai-xuan-jing-symbol
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
584 counting-rod-numeral
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
585 mahjong-tile
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
586 domino-tile))
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
587 (set-fontset-font "fontset-default"
103780
564f64e0d6db (setup-default-fontset): For each script, append (not set) font-specs.
Kenichi Handa <handa@m17n.org>
parents: 103633
diff changeset
588 script (font-spec :registry "iso10646-1" :script script)
564f64e0d6db (setup-default-fontset): For each script, append (not set) font-specs.
Kenichi Handa <handa@m17n.org>
parents: 103633
diff changeset
589 nil 'append))
100494
bfae6a3eb510 (script-representative-chars): Add more scripts.
Kenichi Handa <handa@m17n.org>
parents: 100310
diff changeset
590
101808
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
591 ;; Special settings for `MATHEMATICAL (U+1D400..U+1D7FF)'.
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
592 (dolist (math-subgroup '((#x1D400 #x1D433 mathematical-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
593 (#x1D434 #x1D467 mathematical-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
594 (#x1D468 #x1D49B mathematical-bold-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
595 (#x1D49C #x1D4CF mathematical-script)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
596 (#x1D4D0 #x1D503 mathematical-bold-script)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
597 (#x1D504 #x1D537 mathematical-fraktur)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
598 (#x1D538 #x1D56B mathematical-double-struck)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
599 (#x1D56C #x1D59F mathematical-bold-fraktur)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
600 (#x1D5A0 #x1D5D3 mathematical-sans-serif)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
601 (#x1D5D4 #x1D607 mathematical-sans-serif-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
602 (#x1D608 #x1D63B mathematical-sans-serif-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
603 (#x1D63C #x1D66F mathematical-sans-serif-bold-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
604 (#x1D670 #x1D6A3 mathematical-monospace)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
605 (#x1D6A4 #x1D6A5 mathematical-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
606 (#x1D6A8 #x1D6E1 mathematical-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
607 (#x1D6E2 #x1D71B mathematical-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
608 (#x1D71C #x1D755 mathematical-bold-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
609 (#x1D756 #x1D78F mathematical-sans-serif-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
610 (#x1D790 #x1D7C9 mathematical-sans-serif-bold-italic)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
611 (#x1D7CA #x1D7D7 mathematical-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
612 (#x1D7D8 #x1D7E1 mathematical-double-struck)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
613 (#x1D7E2 #x1D7EB mathematical-sans-serif)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
614 (#x1D7EC #x1D7F5 mathematical-sans-serif-bold)
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
615 (#x1D7F6 #x1D7FF mathematical-monospace)))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
616 (let ((slot (assq (nth 2 math-subgroup) script-representative-chars)))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
617 (if slot
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
618 (if (vectorp (cdr slot))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
619 (setcdr slot (vconcat (cdr slot) (vector (car math-subgroup))))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
620 (setcdr slot (vector (cadr slot) (car math-subgroup))))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
621 (setq slot (list (nth 2 math-subgroup) (car math-subgroup)))
101815
f237c13dd6f5 (setup-default-fontset): Append entries for mathematical, instead of
Kenichi Handa <handa@m17n.org>
parents: 101808
diff changeset
622 (nconc script-representative-chars (list slot))))
101808
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
623 (set-fontset-font
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
624 "fontset-default"
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
625 (cons (car math-subgroup) (nth 1 math-subgroup))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
626 (font-spec :registry "iso10646-1" :script (nth 2 math-subgroup))))
c7ce5de26833 (script-representative-chars): Remove
Kenichi Handa <handa@m17n.org>
parents: 101120
diff changeset
627
103633
1ee218237a45 (setup-default-fontset): Add CJK fonts
Kenichi Handa <handa@m17n.org>
parents: 103483
diff changeset
628 ;; Append CJK fonts for characters other than han, kana, cjk-misc.
104630
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
629 ;; Append fonts for scripts whose name is also a charset name.
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
630 (let* ((data (build-default-fontset-data))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
631 (registries (car data)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
632 (dolist (target-spec (cdr data))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
633 (let ((target (car target-spec))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
634 (spec (cdr target-spec)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
635 (if (integerp spec)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
636 (dotimes (i (length registries))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
637 (if (> (logand spec (lsh 1 i)) 0)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
638 (set-fontset-font "fontset-default" target
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
639 (cons nil (aref registries i))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
640 nil 'append)))
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
641 (dolist (args spec)
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
642 (set-fontset-font "fontset-default" target
1319ad0c3806 (build-default-fontset-data): New macro.
Kenichi Handa <handa@m17n.org>
parents: 103780
diff changeset
643 (apply 'font-spec args) nil 'append))))))
103633
1ee218237a45 (setup-default-fontset): Add CJK fonts
Kenichi Handa <handa@m17n.org>
parents: 103483
diff changeset
644
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
645 ;; Append Unicode fonts.
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
646 ;; This may find fonts with more variants (bold, italic) but which
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
647 ;; don't cover many characters.
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
648 (set-fontset-font "fontset-default" nil
97843
614184e29c56 (setup-default-fontset): Prepend
Kenichi Handa <handa@m17n.org>
parents: 97559
diff changeset
649 '(nil . "iso10646-1") nil 'prepend)
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
650 ;; These may find fonts that cover many characters but with fewer
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89409
diff changeset
651 ;; variants.
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
652 (set-fontset-font "fontset-default" nil
97843
614184e29c56 (setup-default-fontset): Prepend
Kenichi Handa <handa@m17n.org>
parents: 97559
diff changeset
653 '("gnu-unifont" . "iso10646-1") nil 'prepend)
89806
960bd3cc1872 (setup-default-fontset): Delete the
Kenichi Handa <handa@m17n.org>
parents: 89802
diff changeset
654 (set-fontset-font "fontset-default" nil
97843
614184e29c56 (setup-default-fontset): Prepend
Kenichi Handa <handa@m17n.org>
parents: 97559
diff changeset
655 '("mutt-clearlyu" . "iso10646-1") nil 'prepend)
100310
09f8cceecffd (setup-default-fontset): Add an entry for characters in the Unicode
Kenichi Handa <handa@m17n.org>
parents: 97906
diff changeset
656 (set-fontset-font "fontset-default" '(#x20000 . #x2FFFF)
09f8cceecffd (setup-default-fontset): Add an entry for characters in the Unicode
Kenichi Handa <handa@m17n.org>
parents: 97906
diff changeset
657 '(nil . "unicode-sip"))
91358
65fc7a40f435 (script-representative-chars): Add cham
Kenichi Handa <handa@m17n.org>
parents: 91330
diff changeset
658
102815
71a9716c3fc1 (setup-default-fontset): Specify
Kenichi Handa <handa@m17n.org>
parents: 102707
diff changeset
659 (set-fontset-font "fontset-default" '(#xE000 . #xF8FF)
71a9716c3fc1 (setup-default-fontset): Specify
Kenichi Handa <handa@m17n.org>
parents: 102707
diff changeset
660 '(nil . "iso10646-1"))
71a9716c3fc1 (setup-default-fontset): Specify
Kenichi Handa <handa@m17n.org>
parents: 102707
diff changeset
661 ;; Don't try the fallback fonts even if no suitable font was found
71a9716c3fc1 (setup-default-fontset): Specify
Kenichi Handa <handa@m17n.org>
parents: 102707
diff changeset
662 ;; by the above font-spec.
71a9716c3fc1 (setup-default-fontset): Specify
Kenichi Handa <handa@m17n.org>
parents: 102707
diff changeset
663 (set-fontset-font "fontset-default" '(#xE000 . #xF8FF) nil nil 'append))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
664
102638
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
665 (defun create-default-fontset ()
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
666 "Create the default fontset.
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
667 Internal use only. Should be called at startup time."
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
668 (condition-case err
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
669 (setup-default-fontset)
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
670 (error (display-warning
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
671 'initialization
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
672 (format "Creation of the default fontsets failed: %s" err)
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
673 :error))))
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
674
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
675 ;; These are the registered registries/encodings from
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
676 ;; ftp://ftp.x.org/pub/DOCS/registry 2001/06/01
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
677
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
678 ;; Name Reference
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
679 ;; ---- ---------
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
680 ;; "DEC" [27]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
681 ;; registry prefix
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
682 ;; "DEC.CNS11643.1986-2" [53]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
683 ;; CNS11643 2-plane using the encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
684 ;; suggested in that standard
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
685 ;; "DEC.DTSCS.1990-2" [54]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
686 ;; DEC Taiwan Supplemental Character Set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
687 ;; "fujitsu.u90x01.1991-0" [87]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
688 ;; "fujitsu.u90x03.1991-0" [87]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
689 ;; "GB2312.1980-0" [39],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
690 ;; China (PRC) Hanzi, GL encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
691 ;; "GB2312.1980-1" [39]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
692 ;; (deprecated)
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
693 ;; China (PRC) Hanzi, GR encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
694 ;; "HP-Arabic8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
695 ;; HPARABIC8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
696 ;; "HP-East8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
697 ;; HPEAST8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
698 ;; "HP-Greek8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
699 ;; HPGREEK8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
700 ;; "HP-Hebrew8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
701 ;; HPHEBREW8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
702 ;; "HP-Japanese15" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
703 ;; HPJAPAN15 15-bit characer set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
704 ;; modified from industry defacto
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
705 ;; standard Shift-JIS
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
706 ;; "HP-Kana8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
707 ;; HPKANA8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
708 ;; "HP-Korean15" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
709 ;; HPKOREAN15 15-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
710 ;; "HP-Roman8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
711 ;; HPROMAN8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
712 ;; "HP-SChinese15" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
713 ;; HPSCHINA15 15-bit character set for
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
714 ;; support of Simplified Chinese
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
715 ;; "HP-TChinese15" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
716 ;; HPTCHINA15 15-bit character set for
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
717 ;; support of Traditional Chinese
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
718 ;; "HP-Turkish8" [36]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
719 ;; HPTURKISH8 8-bit character set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
720 ;; "IPSYS" [59]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
721 ;; registry prefix
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
722 ;; "IPSYS.IE-1" [59]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
723 ;; "ISO2022"<REG>"-"<ENC> [44]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
724 ;; "ISO646.1991-IRV" [107]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
725 ;; ISO 646 International Reference Version
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
726 ;; "ISO8859-1" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
727 ;; ISO Latin alphabet No. 1
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
728 ;; "ISO8859-2" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
729 ;; ISO Latin alphabet No. 2
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
730 ;; "ISO8859-3" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
731 ;; ISO Latin alphabet No. 3
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
732 ;; "ISO8859-4" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
733 ;; ISO Latin alphabet No. 4
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
734 ;; "ISO8859-5" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
735 ;; ISO Latin/Cyrillic alphabet
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
736 ;; "ISO8859-6" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
737 ;; ISO Latin/Arabic alphabet
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
738 ;; "ISO8859-7" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
739 ;; ISO Latin/Greek alphabet
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
740 ;; "ISO8859-8" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
741 ;; ISO Latin/Hebrew alphabet
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
742 ;; "ISO8859-9" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
743 ;; ISO Latin alphabet No. 5
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
744 ;; "ISO8859-10" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
745 ;; ISO Latin alphabet No. 6
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
746 ;; "ISO8859-13" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
747 ;; ISO Latin alphabet No. 7
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
748 ;; "ISO8859-14" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
749 ;; ISO Latin alphabet No. 8
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
750 ;; "ISO8859-15" [15],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
751 ;; ISO Latin alphabet No. 9
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
752 ;; "FCD8859-15" [7]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
753 ;; (deprecated)
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
754 ;; ISO Latin alphabet No. 9, Final Committee Draft
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
755 ;; "ISO10646-1" [133]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
756 ;; Unicode Universal Multiple-Octet Coded Character Set
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
757 ;; "ISO10646-MES" [133]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
758 ;; (deprecated)
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
759 ;; Unicode Minimum European Subset
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
760 ;; "JISX0201.1976-0" [38],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
761 ;; 8-Bit Alphanumeric-Katakana Code
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
762 ;; "JISX0208.1983-0" [40],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
763 ;; Japanese Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
764 ;; GL encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
765 ;; "JISX0208.1990-0" [71]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
766 ;; Japanese Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
767 ;; GL encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
768 ;; "JISX0208.1983-1" [40]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
769 ;; (deprecated)
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
770 ;; Japanese Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
771 ;; GR encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
772 ;; "JISX0212.1990-0" [72]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
773 ;; Supplementary Japanese Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
774 ;; GL encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
775 ;; "KOI8-R" [119]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
776 ;; Cyrillic alphabet
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
777 ;; "KSC5601.1987-0" [41],[12]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
778 ;; Korean Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
779 ;; GL encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
780 ;; "KSC5601.1987-1" [41]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
781 ;; (deprecated)
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
782 ;; Korean Graphic Character Set,
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
783 ;; GR encoding
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
784 ;; "omron_CNS11643-0" [45]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
785 ;; "omron_CNS11643-1" [45]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
786 ;; "omron_BIG5-0" [45]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
787 ;; "omron_BIG5-1" [45]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
788 ;; "wn.tamil.1993" [103]
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
789
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
790 (defun set-font-encoding (pattern charset)
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
791 "Set arguments in `font-encoding-alist' (which see)."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
792 (let ((slot (assoc pattern font-encoding-alist)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
793 (if slot
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
794 (setcdr slot charset)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
795 (setq font-encoding-alist
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
796 (cons (cons pattern charset) font-encoding-alist)))))
32646
43edadfecb51 Use registry "MuleTibetan-2" for Tibetan.
Kenichi Handa <handa@m17n.org>
parents: 29427
diff changeset
797
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
798 (defvar x-pixel-size-width-font-regexp)
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
799 (defvar vertical-centering-font-regexp)
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
800
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
801 ;; Setting for suppressing XLoadQueryFont on big fonts.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
802 (setq x-pixel-size-width-font-regexp
105870
26baacb565b0 * textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105798
diff changeset
803 (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
804
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
805 ;; These fonts require vertical centering.
26886
8a6d8101919e (vertical-centering-font-regexp): New
Kenichi Handa <handa@m17n.org>
parents: 26013
diff changeset
806 (setq vertical-centering-font-regexp
105870
26baacb565b0 * textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105798
diff changeset
807 (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5"))
26886
8a6d8101919e (vertical-centering-font-regexp): New
Kenichi Handa <handa@m17n.org>
parents: 26013
diff changeset
808
50516
125da3e3e9af Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents: 50257
diff changeset
809 ;; 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
810 (setq face-font-rescale-alist
105870
26baacb565b0 * textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105798
diff changeset
811 (list (cons (purecopy "-cdac$") 1.3)))
50516
125da3e3e9af Specify rescale ratio 1.3 for CDAC fonts.
Kenichi Handa <handa@m17n.org>
parents: 50257
diff changeset
812
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
813 (defvar x-font-name-charset-alist nil
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
814 "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
815
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
816 ;;; XLFD (X Logical Font Description) format handler.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
817
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
818 ;; Define XLFD's field index numbers. ; field name
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
819 (defconst xlfd-regexp-family-subnum 0) ; FOUNDRY and FAMILY
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
820 (defconst xlfd-regexp-weight-subnum 1) ; WEIGHT_NAME
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
821 (defconst xlfd-regexp-slant-subnum 2) ; SLANT
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
822 (defconst xlfd-regexp-swidth-subnum 3) ; SETWIDTH_NAME
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
823 (defconst xlfd-regexp-adstyle-subnum 4) ; ADD_STYLE_NAME
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
824 (defconst xlfd-regexp-pixelsize-subnum 5) ; PIXEL_SIZE
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
825 (defconst xlfd-regexp-pointsize-subnum 6) ; POINT_SIZE
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
826 (defconst xlfd-regexp-resx-subnum 7) ; RESOLUTION_X
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
827 (defconst xlfd-regexp-resy-subnum 8) ; RESOLUTION_Y
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
828 (defconst xlfd-regexp-spacing-subnum 8) ; SPACING
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
829 (defconst xlfd-regexp-avgwidth-subnum 10) ; AVERAGE_WIDTH
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
830 (defconst xlfd-regexp-registry-subnum 11) ; REGISTRY and ENCODING
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
831
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
832 ;; Regular expression matching against a fontname which conforms to
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
833 ;; XLFD (X Logical Font Description). All fields in XLFD should be
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
834 ;; not be omitted (but can be a wild card) to be matched.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
835 (defconst xlfd-tight-regexp
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
836 "^\
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
837 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
838 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
839 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*-[^-]*\\)$")
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
840
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
841 ;; Regular expression matching against a fontname which conforms to
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
842 ;; XLFD (X Logical Font Description). All fields in XLFD from FOUNDRY
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
843 ;; to ADSTYLE, REGISTRY, and ENCODING should be not be omitted (but
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
844 ;; can be a wild card) to be matched.
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
845 (defconst xlfd-style-regexp
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
846 "^\
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
847 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-.*\
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
848 -\\([^-]*-[^-]*\\)$")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
849
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
850 ;; List of field numbers of XLFD whose values are numeric.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
851 (defconst xlfd-regexp-numeric-subnums
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
852 (list xlfd-regexp-pixelsize-subnum ;5
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
853 xlfd-regexp-pointsize-subnum ;6
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
854 xlfd-regexp-resx-subnum ;7
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
855 xlfd-regexp-resy-subnum ;8
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
856 xlfd-regexp-avgwidth-subnum ;10
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
857 ))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
858
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
859 (defun x-decompose-font-name (pattern)
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
860 "Decompose PATTERN into XLFD fields and return a vector of the fields.
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
861 The length of the vector is 12.
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
862 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
863 element of the vector.
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
864 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
865 element of the vector.
23890
fa4839661777 (x-decompose-font-name): If PATTERN
Kenichi Handa <handa@m17n.org>
parents: 23655
diff changeset
866
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
867 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
868 (if (string-match xlfd-tight-regexp pattern)
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
869 (let ((xlfd-fields (make-vector 12 nil)))
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
870 (dotimes (i 12)
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
871 (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
872 (dotimes (i 12)
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
873 (if (string-match "^[*-]+$" (aref xlfd-fields i))
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
874 (aset xlfd-fields i nil)))
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
875 xlfd-fields)))
17177
9e550b522bc0 (x-charset-registries): Change entry for Ethiopic.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
876
22449
c87830c691a5 (instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents: 22161
diff changeset
877 (defun x-compose-font-name (fields &optional reduce)
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
878 "Compose X fontname from FIELDS.
90718
f1d13e615070 Merge from emacs--devo--0
Miles Bader <miles@gnu.org>
parents: 90686 74330
diff changeset
879 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
880 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
881 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
882 and is always ignored."
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
883 (concat "-" (mapconcat (lambda (x) (or x "*")) fields "-")))
23205
22df54cdb841 (resolved-ascii-font): New variable.
Kenichi Handa <handa@m17n.org>
parents: 23196
diff changeset
884
40250
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
885
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
886 (defun x-must-resolve-font-name (xlfd-fields)
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
887 "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
888 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
889 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
890 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
891 Value is name of that font."
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
892 (let ((ascii-font nil) (index 0))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
893 (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
894 (let ((pattern (x-compose-font-name xlfd-fields)))
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
895 (condition-case nil
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
896 (setq ascii-font (x-resolve-font-name pattern))
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
897 (error
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
898 (message "Warning: no fonts matching `%s' available" pattern)
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
899 (aset xlfd-fields index "*")
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
900 (setq index (1+ index))))))
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
901 (unless ascii-font
50581
4daf1ecf4381 (create-fontset-from-ascii-font): Doc fix.
John Paul Wallington <jpw@pobox.com>
parents: 50516
diff changeset
902 (error "No fonts found"))
40250
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
903 ascii-font))
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
904
4f3033e5b688 (x-must-resolve-font-name): New
Gerd Moellmann <gerd@gnu.org>
parents: 38414
diff changeset
905
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
906 (defun x-complement-fontset-spec (default-spec fontlist)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
907 "Complement elements of FONTLIST based on DEFAULT-SPEC.
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
908 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
909 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
910
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
911 The font names are parsed and unspecified font properties are
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
912 given from DEFAULT-SPEC."
91291
fbd539674745 (x-complement-fontset-spec): Complement size too.
Kenichi Handa <handa@m17n.org>
parents: 91263
diff changeset
913 (let ((prop-list '(:foundry :family :weight :slant :width :adstyle :size)))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
914 (dolist (elt fontlist)
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
915 (let ((spec (font-spec :name (cadr elt))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
916 (dolist (prop prop-list)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
917 (let ((val (font-get spec prop)))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
918 (or val
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
919 (font-put spec prop (font-get default-spec prop)))))
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
920 (setcar (cdr elt) spec)))
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
921 fontlist))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
922
19049
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
923 (defun fontset-name-p (fontset)
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
924 "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
925 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
926 with \"fontset\" in `<CHARSET_REGISTRY>' field."
19049
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
927 (and (string-match xlfd-tight-regexp fontset)
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
928 (string= (match-string (1+ xlfd-regexp-registry-subnum) fontset)
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
929 "fontset")))
cad4c032fa26 (fontset-name-p): New function.
Kenichi Handa <handa@m17n.org>
parents: 18719
diff changeset
930
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
931 (declare-function fontset-list "fontset.c" ())
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
932
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
933 (defun generate-fontset-menu ()
89274
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
934 "Return list to be appended to `x-fixed-font-alist'.
865b111141b6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 89268
diff changeset
935 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
936 (let (l)
3e0204a3fcb8 (generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents: 89004
diff changeset
937 (dolist (fontset (fontset-list))
3e0204a3fcb8 (generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents: 89004
diff changeset
938 (or (string-match "fontset-default$" fontset)
94954
81ec00f72dc6 (setup-default-fontset): For kana, han,
Kenichi Handa <handa@m17n.org>
parents: 94664
diff changeset
939 (string-match "fontset-auto[0-9]+$" fontset)
89127
3e0204a3fcb8 (generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents: 89004
diff changeset
940 (push (list (fontset-plain-name fontset) fontset) l)))
24160
ab814ec4995e (generate-fontset-menu): Return a
Kenichi Handa <handa@m17n.org>
parents: 24153
diff changeset
941 (cons "Fontset"
89127
3e0204a3fcb8 (generate-fontset-menu): Exclude the defualt fontset.
Kenichi Handa <handa@m17n.org>
parents: 89004
diff changeset
942 (sort l #'(lambda (x y) (string< (car x) (car y)))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
943
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
944 (declare-function query-fontset "fontset.c" (pattern &optional regexpp))
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
945
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
946 (defun fontset-plain-name (fontset)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
947 "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
948 (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
949 (error "Invalid fontset: %s" fontset))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
950 (let ((xlfd-fields (x-decompose-font-name fontset)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
951 (if xlfd-fields
89004
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
952 (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
953 (weight (aref xlfd-fields xlfd-regexp-weight-subnum))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
954 (slant (aref xlfd-fields xlfd-regexp-slant-subnum))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
955 (swidth (aref xlfd-fields xlfd-regexp-swidth-subnum))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
956 (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
957 (nickname (aref xlfd-fields xlfd-regexp-registry-subnum))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
958 name)
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
959 (if (not (string-match "^fontset-\\(.*\\)$" nickname))
89004
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
960 (setq nickname family)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
961 (setq nickname (match-string 1 nickname)))
90344
d4661241b1fa (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90200
diff changeset
962 (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
963 (setq name (format "%s: %s-dot" nickname size))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
964 (setq name nickname))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
965 (and weight
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
966 (cond ((string-match "^medium$" weight)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
967 (setq name (concat name " " "medium")))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
968 ((string-match "^bold$\\|^demibold$" weight)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
969 (setq name (concat name " " weight)))))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
970 (and slant
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
971 (cond ((string-match "^i$" slant)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
972 (setq name (concat name " " "italic")))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
973 ((string-match "^o$" slant)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
974 (setq name (concat name " " "slant")))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
975 ((string-match "^ri$" slant)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
976 (setq name (concat name " " "reverse italic")))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
977 ((string-match "^ro$" slant)
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
978 (setq name (concat name " " "reverse slant")))))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
979 name)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
980 fontset)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
981
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
982 (defvar charset-script-alist
89143
7b8bd597892a (charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents: 89127
diff changeset
983 '((ascii . latin)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
984 (latin-iso8859-1 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
985 (latin-iso8859-2 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
986 (latin-iso8859-3 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
987 (latin-iso8859-4 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
988 (latin-iso8859-9 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
989 (latin-iso8859-10 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
990 (latin-iso8859-13 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
991 (latin-iso8859-14 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
992 (latin-iso8859-15 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
993 (latin-iso8859-16 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
994 (latin-jisx0201 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
995 (thai-tis620 . thai)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
996 (cyrillic-iso8859-5 . cyrillic)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
997 (arabic-iso8859-6 . arabic)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
998 (greek-iso8859-7 . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
999 (hebrew-iso8859-8 . latin)
89143
7b8bd597892a (charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents: 89127
diff changeset
1000 (katakana-jisx0201 . kana)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1001 (chinese-gb2312 . han)
90005
0c0b009323eb (font-encoding-alist): Add gbk.
Kenichi Handa <handa@m17n.org>
parents: 89909
diff changeset
1002 (chinese-gbk . han)
90686
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
1003 (gb18030-2-byte . han)
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
1004 (gb18030-4-byte-bmp . han)
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
1005 (gb18030-4-byte-ext-1 . han)
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
1006 (gb18030-4-byte-ext-2 . han)
5b24bb105d42 (font-encoding-alist): Add gb18030.
Kenichi Handa <handa@m17n.org>
parents: 90644
diff changeset
1007 (gb18030-4-byte-smp . han)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1008 (chinese-big5-1 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1009 (chinese-big5-2 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1010 (chinese-cns11643-1 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1011 (chinese-cns11643-2 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1012 (chinese-cns11643-3 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1013 (chinese-cns11643-4 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1014 (chinese-cns11643-5 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1015 (chinese-cns11643-6 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1016 (chinese-cns11643-7 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1017 (japanese-jisx0208 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1018 (japanese-jisx0208-1978 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1019 (japanese-jisx0212 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1020 (japanese-jisx0213-1 . han)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1021 (japanese-jisx0213-2 . han)
89143
7b8bd597892a (charset-script-alist): Fix script names.
Kenichi Handa <handa@m17n.org>
parents: 89127
diff changeset
1022 (korean-ksc5601 . hangul)
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1023 (chinese-sisheng . bopomofo)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1024 (vietnamese-viscii-lower . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1025 (vietnamese-viscii-upper . latin)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1026 (arabic-digit . arabic)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1027 (arabic-1-column . arabic)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1028 (arabic-2-column . arabic)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1029 (indian-is13194 . devanagari)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1030 (indian-glyph . devanagari)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1031 (indian-1-column . devanagari)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1032 (indian-2-column . devanagari)
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1033 (tibetan-1-column . tibetan))
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1034 "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
1035
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1036 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
1037 to map charsets to scripts.")
49287
5cb7e7103296 Don't setup the default fontset and
Kenichi Handa <handa@m17n.org>
parents: 47711
diff changeset
1038
22161
7a4c3fd89dda (x-font-name-charset-alist): New
Kenichi Handa <handa@m17n.org>
parents: 22128
diff changeset
1039 (defun create-fontset-from-fontset-spec (fontset-spec
22449
c87830c691a5 (instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents: 22161
diff changeset
1040 &optional style-variant noerror)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1041 "Create a fontset from fontset specification string FONTSET-SPEC.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1042 FONTSET-SPEC is a string of the format:
101120
c7a080d2d889 * international/fontset.el (create-fontset-from-fontset-spec): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents: 100908
diff changeset
1043 FONTSET-NAME,SCRIPT-NAME0:FONT-NAME0,SCRIPT-NAME1:FONT-NAME1, ...
17755
4c82e87c7d7c (x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents: 17339
diff changeset
1044 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
1045
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1046 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
1047 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
1048 \"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
1049 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
1050 name.
22672
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1051
90718
f1d13e615070 Merge from emacs--devo--0
Miles Bader <miles@gnu.org>
parents: 90686 74330
diff changeset
1052 Optional 2nd and 3rd arguments exist just for backward compatibility,
f1d13e615070 Merge from emacs--devo--0
Miles Bader <miles@gnu.org>
parents: 90686 74330
diff changeset
1053 and are ignored.
22672
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1054
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1055 It returns a name of the created fontset.
22672
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1056
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1057 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
1058 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
1059 `charset-script-alist' (which see)."
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1060 (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
1061 (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
1062 (let ((idx (match-end 0))
4c82e87c7d7c (x-decompose-font-name): While seting each field of
Kenichi Handa <handa@m17n.org>
parents: 17339
diff changeset
1063 (name (match-string 0 fontset-spec))
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
1064 default-spec target script fontlist)
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
1065 (or (string-match xlfd-tight-regexp name)
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1066 (error "Fontset name \"%s\" not conforming to XLFD" name))
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
1067 (setq default-spec (font-spec :name name))
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1068 ;; At first, extract pairs of charset and fontname from FONTSET-SPEC.
101120
c7a080d2d889 * international/fontset.el (create-fontset-from-fontset-spec): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents: 100908
diff changeset
1069 (while (string-match "[, \t\n]*\\([^:]+\\):[ \t]*\\([^,]+\\)"
90348
c98f49021a42 (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90344
diff changeset
1070 fontset-spec idx)
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1071 (setq idx (match-end 0))
90344
d4661241b1fa (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90200
diff changeset
1072 (setq target (intern (match-string 1 fontset-spec)))
d4661241b1fa (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90200
diff changeset
1073 (cond ((or (eq target 'ascii)
90644
9b62e05dedf6 (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90592
diff changeset
1074 (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
1075 (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
1076 ((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
1077 (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
1078 ((charsetp target)
d4661241b1fa (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90200
diff changeset
1079 (push (list target (match-string 2 fontset-spec)) fontlist))))
22449
c87830c691a5 (instantiate-fontset): Delete
Kenichi Handa <handa@m17n.org>
parents: 22161
diff changeset
1080
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1081 ;; Complement FONTLIST.
91263
a3dec2a13232 (font-encoding-charset-alist):
Kenichi Handa <handa@m17n.org>
parents: 91233
diff changeset
1082 (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
1083
89357
8f8c7d4c2e6e Enable the default fontset to use
Kenichi Handa <handa@m17n.org>
parents: 89325
diff changeset
1084 ;; Create a fontset.
90344
d4661241b1fa (create-fontset-from-fontset-spec): Fix
Kenichi Handa <handa@m17n.org>
parents: 90200
diff changeset
1085 (new-fontset name (nreverse fontlist))))
22672
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1086
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1087 (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
1088 fontset-name)
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1089 "Create a fontset from an ASCII font FONT.
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1090
74330
5401c4ed263b (create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents: 74190
diff changeset
1091 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
1092 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
1093 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
1094
74330
5401c4ed263b (create-fontset-from-ascii-font, create-fontset-from-fontset-spec,
Juanma Barranquero <lekktu@gmail.com>
parents: 74190
diff changeset
1095 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
1096 `<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
1097 an appropriate name is generated automatically.
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1098
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1099 It returns a name of the created fontset."
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
1100 (setq font (downcase font))
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1101 (setq resolved-font
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1102 (downcase (or resolved-font (x-resolve-font-name font))))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
1103 (let ((xlfd (x-decompose-font-name resolved-font))
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
1104 fontset)
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
1105 (if fontset-name
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
1106 (setq fontset-name (downcase fontset-name))
89004
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
1107 (if (query-fontset "fontset-startup")
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
1108 (setq fontset-name
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
1109 (subst-char-in-string
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
1110 ?- ?_ (aref xlfd xlfd-regexp-registry-subnum) t))
fbd881940a45 (fontset-plain-name): If the fontset
Kenichi Handa <handa@m17n.org>
parents: 88893
diff changeset
1111 (setq fontset-name "startup")))
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
1112 (aset xlfd xlfd-regexp-registry-subnum
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
1113 (format "fontset-%s" fontset-name))
22672
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1114 (setq fontset (x-compose-font-name xlfd))
9cfa1a788a5a (create-fontset-from-fontset-spec):
Kenichi Handa <handa@m17n.org>
parents: 22618
diff changeset
1115 (or (query-fontset fontset)
28215
ceaded4c2cb9 (x-charset-registries): Variable
Kenichi Handa <handa@m17n.org>
parents: 27534
diff changeset
1116 (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
1117
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1118
17842
cb1af8ead3df (standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents: 17755
diff changeset
1119 ;; 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
1120 ;; 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
1121 ;; 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
1122 ;; many cases.
17842
cb1af8ead3df (standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents: 17755
diff changeset
1123 (defvar standard-fontset-spec
88405
8ae0d0693ed9 Mostly re-written.
Kenichi Handa <handa@m17n.org>
parents: 42329
diff changeset
1124 (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
1125 "String of fontset spec of the standard fontset.
cb1af8ead3df (standard-fontset-spec): Name changed from
Kenichi Handa <handa@m17n.org>
parents: 17755
diff changeset
1126 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
1127 with correct glyphs by using the standard fontset.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1128 See the documentation of `create-fontset-from-fontset-spec' for the format.")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1129
88893
86354924a790 Setup the default fontset by the new
Kenichi Handa <handa@m17n.org>
parents: 88694
diff changeset
1130
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1131 ;; Create fontsets from X resources of the name `fontset-N (class
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1132 ;; Fontset-N)' where N is integer 0, 1, ...
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1133 ;; 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
1134 ;; `standard-fontset-spec'.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1135
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
1136 (declare-function x-get-resource "frame.c"
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
1137 (attribute class &optional component subclass))
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 95696
diff changeset
1138
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1139 (defun create-fontset-from-x-resource ()
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1140 (let ((idx 0)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1141 fontset-spec)
27534
eeb998860456 (standard-fontset-spec): Purecopy it.
Dave Love <fx@gnu.org>
parents: 26886
diff changeset
1142 (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
1143 (format "Fontset-%d" idx)))
93576
ed9ff03f156c (create-fontset-from-x-resource):
Kenichi Handa <handa@m17n.org>
parents: 93516
diff changeset
1144 (condition-case nil
102638
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
1145 (create-fontset-from-fontset-spec fontset-spec t)
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
1146 (error (display-warning
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
1147 'initialization
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
1148 (format "Fontset-%d: invalid specification in X resource" idx)
6f3f8314ba75 (create-default-fontset): New function.
Kenichi Handa <handa@m17n.org>
parents: 101815
diff changeset
1149 :warning)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1150 (setq idx (1+ idx)))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1151
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1152 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1153 (provide 'fontset)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1154
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 93576
diff changeset
1155 ;; arch-tag: bb53e629-0234-403c-950e-551e61554849
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1156 ;;; fontset.el ends here