1 ;;; fontset.el --- commands for handling fontset
3 ;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
8 ;; Copyright (C) 2003, 2006
9 ;; National Institute of Advanced Industrial Science and Technology (AIST)
10 ;; Registration Number H13PRO009
12 ;; Keywords: mule, i18n, fontset
14 ;; This file is part of GNU Emacs.
16 ;; GNU Emacs is free software: you can redistribute it and/or modify
17 ;; it under the terms of the GNU General Public License as published by
18 ;; the Free Software Foundation, either version 3 of the License, or
19 ;; (at your option) any later version.
21 ;; GNU Emacs is distributed in the hope that it will be useful,
22 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;; GNU General Public License for more details.
26 ;; You should have received a copy of the GNU General Public License
27 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
33 ;; Setup font-encoding-alist for all known encodings.
35 (setq font-encoding-alist
37 (cons (purecopy (car arg)) (cdr arg)))
38 '(("iso8859-1$" . iso-8859-1)
39 ("iso8859-2$" . iso-8859-2)
40 ("iso8859-3$" . iso-8859-3)
41 ("iso8859-4$" . iso-8859-4)
42 ("iso8859-5$" . iso-8859-5)
43 ("iso8859-6$" . iso-8859-6)
44 ("iso8859-7$" . iso-8859-7)
45 ("iso8859-8$" . iso-8859-8)
46 ("iso8859-9$" . iso-8859-9)
47 ("iso8859-10$" . iso-8859-10)
48 ("iso8859-11$" . iso-8859-11)
49 ("iso8859-13$" . iso-8859-13)
50 ("iso8859-14$" . iso-8859-14)
51 ("iso8859-15$" . iso-8859-15)
52 ("iso8859-16$" . iso-8859-16)
54 ("gb2312.1980" . chinese-gb2312)
56 ("gb18030" . (unicode . nil))
57 ("jisx0208.1978" . japanese-jisx0208-1978)
58 ("jisx0208" . japanese-jisx0208)
59 ("jisx0201" . jisx0201)
60 ("jisx0212" . japanese-jisx0212)
61 ("ksx1001" . korean-ksc5601)
62 ("ksc5601.1987" . korean-ksc5601)
63 ("cns11643.1992.*1" . chinese-cns11643-1)
64 ("cns11643.1992.*2" . chinese-cns11643-2)
65 ("cns11643.1992.*3" . chinese-cns11643-3)
66 ("cns11643.1992.*4" . chinese-cns11643-4)
67 ("cns11643.1992.*5" . chinese-cns11643-5)
68 ("cns11643.1992.*6" . chinese-cns11643-6)
69 ("cns11643.1992.*7" . chinese-cns11643-7)
70 ("cns11643.92p1-0" . chinese-cns11643-1)
71 ("cns11643.92p2-0" . chinese-cns11643-2)
72 ("cns11643.92p3-0" . chinese-cns11643-3)
73 ("cns11643.92p4-0" . chinese-cns11643-4)
74 ("cns11643.92p5-0" . chinese-cns11643-5)
75 ("cns11643.92p6-0" . chinese-cns11643-6)
76 ("cns11643.92p7-0" . chinese-cns11643-7)
79 ("tis620" . tis620-2533)
80 ("microsoft-cp1251" . windows-1251)
82 ("jisx0213.2000-1" . japanese-jisx0213-1)
83 ("jisx0213.2000-2" . japanese-jisx0213-2)
84 ("jisx0213.2004-1" . japanese-jisx0213.2004-1)
85 ("iso10646-1$" . (unicode-bmp . nil))
86 ("iso10646.indian-1" . (unicode-bmp . nil))
87 ("unicode-bmp" . (unicode-bmp . nil))
88 ("abobe-symbol" . symbol)
89 ("sisheng_cwnn" . chinese-sisheng)
90 ("mulearabic-0" . arabic-digit)
91 ("mulearabic-1" . arabic-1-column)
92 ("mulearabic-2" . arabic-2-column)
94 ("ethiopic-unicode" . (unicode-bmp . ethiopic))
95 ("is13194-devanagari" . indian-is13194)
96 ("Devanagari-CDAC" . devanagari-cdac)
97 ("Sanskrit-CDAC" . sanskrit-cdac)
98 ("Bengali-CDAC" . bengali-cdac)
99 ("Assamese-CDAC" . assamese-cdac)
100 ("Punjabi-CDAC" . punjabi-cdac)
101 ("Gujarati-CDAC" . gujarati-cdac)
102 ("Oriya-CDAC" . oriya-cdac)
103 ("Tamil-CDAC" . tamil-cdac)
104 ("Telugu-CDAC" . telugu-cdac)
105 ("Kannada-CDAC" . kannada-cdac)
106 ("Malayalam-CDAC" . malayalam-cdac)
107 ("Devanagari-Akruti" . devanagari-akruti)
108 ("Bengali-Akruti" . bengali-akruti)
109 ("Punjabi-Akruti" . punjabi-akruti)
110 ("Gujarati-Akruti" . gujarati-akruti)
111 ("Oriya-Akruti" . oriya-akruti)
112 ("Tamil-Akruti" . tamil-akruti)
113 ("Telugu-Akruti" . telugu-akruti)
114 ("Kannada-Akruti" . kannada-akruti)
115 ("Malayalam-Akruti" . malayalam-akruti)
116 ("muleindian-2" . indian-2-column)
117 ("muleindian-1" . indian-1-column)
118 ("mulelao-1" . mule-lao)
119 ("muletibetan-2" . tibetan)
120 ("muletibetan-0" . tibetan)
121 ("muletibetan-1" . tibetan-1-column))))
123 (defvar font-encoding-charset-alist)
125 (setq font-encoding-charset-alist
126 '((latin-iso8859-1 . iso-8859-1)
127 (latin-iso8859-2 . iso-8859-2)
128 (latin-iso8859-3 . iso-8859-3)
129 (latin-iso8859-4 . iso-8859-4)
130 (latin-iso8859-9 . iso-8859-9)
131 (latin-iso8859-10 . iso-8859-10)
132 (latin-iso8859-13 . iso-8859-13)
133 (latin-iso8859-14 . iso-8859-14)
134 (latin-iso8859-15 . iso-8859-15)
135 (latin-iso8859-16 . iso-8859-16)
136 (cyrillic-iso8859-5 . iso-8859-5)
137 (greek-iso8859-7 . iso-8859-7)
138 (arabic-iso8859-6 . iso-8859-6)
139 (thai-tis620 . tis620-2533)
140 (latin-jisx0201 . jisx0201)
141 (katakana-jisx0201 . jisx0201)
142 (chinese-big5-1 . big5)
143 (chinese-big5-2 . big5)
144 (vietnamese-viscii-lower . viscii)
145 (vietnamese-viscii-upper . viscii)
146 (tibetan . unicode-bmp)))
148 (setq script-representative-chars
149 '((latin ?A ?Z ?a ?z #x00C0 #x0100 #x0180 #x1e00)
150 (phonetic #x250 #x283)
177 (canadian-aboriginal #x14C0)
182 (symbol . [#x201C #x2200 #x2500])
184 (ideographic-description #x2FF0)
195 (aegean-number #x10100)
196 (ancient-greek-number #x10140)
197 (ancient-symbol #x10190)
198 (phaistos-disc #x101D0)
204 (old-persian #x103A0)
209 (caucasian-albanian #x10530)
211 (cypriot-syllabary #x10800)
219 (sinhala-archaic-number #x111E1)
227 (warang-citi #x118A1)
228 (pau-cin-hau #x11AC0)
230 (cuneiform-numbers-and-punctuation #x12400)
233 (pahawh-hmong #x16B11)
234 (duployan-shorthand #x1BC20)
235 (byzantine-musical-symbol #x1D000)
236 (musical-symbol #x1D100)
237 (ancient-greek-musical-notation #x1D200)
238 (tai-xuan-jing-symbol #x1D300)
239 (counting-rod-numeral #x1D360)
240 (mende-kikakui #x1E810)
241 (mahjong-tile #x1F000)
242 (domino-tile #x1F030)))
244 (defvar otf-script-alist)
246 ;; The below was synchronized with the latest Jan 3, 2013 version of
247 ;; https://www.microsoft.com/typography/otspec/scripttags.htm.
248 (setq otf-script-alist
263 (byzm . byzantine-musical-symbol)
264 (cans . canadian-aboriginal)
291 (phli . inscriptional-pahlavi)
292 (prti . inscriptional-parthian)
295 (kana . kana) ; Hiragana
309 (math . mathematical)
310 (mtei . meetei-mayek)
314 (musc . musical-symbol)
321 (sarb . old-south-arabian)
335 (sora . sora-sompeng)
337 (sylo . syloti_nagri)
357 ;; Set standard fontname specification of characters in the default
358 ;; fontset to find an appropriate font for each script/charset. The
359 ;; specification has the form ((SCRIPT FONT-SPEC ...) ...), where
361 ;; a cons (FAMILY . REGISTRY),
362 ;; or a string FONT-NAME,
363 ;; or an object created by `font-spec'.
365 ;; FAMILY may be nil, in which case, the corresponding name of
366 ;; default face is used. If REGISTRY contains a character `-', the
367 ;; string before that is embedded in `CHARSET_REGISTRY' field, and the
368 ;; string after that is embedded in `CHARSET_ENCODING' field. If it
369 ;; does not contain `-', the whole string is embedded in
370 ;; `CHARSET_REGISTRY' field, and a wild card character `*' is embedded
371 ;; in `CHARSET_ENCODING' field.
373 ;; SCRIPT is a symbol that appears as an element of the char table
374 ;; `char-script-table'. SCRIPT may be a charset specifying the range
377 (declare-function new-fontset "fontset.c" (name fontlist))
378 (declare-function set-fontset-font "fontset.c"
379 (name target font-spec &optional frame add))
383 ;; Build data to initialize the default fontset at compile time to
384 ;; avoid loading charsets that won't be necessary at runtime.
386 ;; The value is (CJK-REGISTRY-VECTOR TARGET-SPEC ...), where
387 ;; CJK-REGISTRY-VECTOR is ["JISX0208.1983-0" "GB2312.1980-0" ...],
388 ;; TARGET-SPEC is (TARGET . BITMASK) or (TARGET SPEC ...),
389 ;; TARGET is CHAR or (FROM-CHAR . TO-CHAR),
390 ;; BITMASK is a bitmask of indices to CJK-REGISTRY-VECTOR,
391 ;; SPEC is a list of arguments to font-spec.
393 (defmacro build-default-fontset-data ()
394 (let* (;; CHARSET-REGISTRY CHARSET FROM-CODE TO-CODE
395 (cjk '(("JISX0208.1983-0" japanese-jisx0208 #x2121 #x287E)
396 ("GB2312.1980-0" chinese-gb2312 #x2121 #x297E)
397 ("BIG5-0" big5 #xA140 #xA3FE)
398 ("CNS11643.1992-1" chinese-cns11643-1 #x2121 #x427E)
399 ("KSC5601.1987-0" korean-ksc5601 #x2121 #x2C7E)))
401 (:registry "iso10646-1" :otf (tibt nil (ccmp blws abvs)))
402 (:family "mtib" :registry "iso10646-1")
403 (:registry "muletibetan-2"))
405 (:registry "iso10646-1" :script ethiopic)
406 (:registry "ethiopic-unicode"))
408 (:registry "iso10646-1" :script phonetic)
409 (:registry "MuleIPA-1")
410 (:registry "iso10646-1"))))
411 (cjk-table (make-char-table nil))
416 #'(lambda (range val)
417 (when (eq val script)
419 (setq range (cons (car range) (cdr range))))
420 (push range coverage)))
423 (data (list (vconcat (mapcar 'car cjk))))
426 (let ((mask (lsh 1 i)))
428 #'(lambda (range _arg)
429 (let ((from (car range)) (to (cdr range)))
432 (or (memq (aref char-script-table from)
433 '(kana hangul han cjk-misc))
435 (logior (or (aref cjk-table from) 0) mask)))
436 (setq from (1+ from))))))
437 (nth 1 elt) nil (nth 2 elt) (nth 3 elt)))
440 #'(lambda (range val)
442 (setq range (cons (car range) (cdr range))))
443 (push (cons range val) data))
445 (dolist (script scripts)
446 (dolist (range (funcall script-coverage (car script)))
447 (push (cons range (cdr script)) data)))
448 `(quote ,(nreverse data))))
451 (defun setup-default-fontset ()
452 "Setup the default fontset."
456 (latin (nil . "ISO8859-1")
466 (nil . "VISCII1.1-1")
467 ,(font-spec :registry "iso10646-1" :script 'latin))
469 (thai ,(font-spec :registry "iso10646-1" :otf '(thai nil nil (mark)))
470 ,(font-spec :registry "iso10646-1" :script 'thai)
472 (nil . "ISO8859-11"))
474 (devanagari ,(font-spec :registry "iso10646-1" :otf '(deva nil (rphf)))
475 (nil . "iso10646.indian-1"))
476 (bengali ,(font-spec :registry "iso10646-1" :otf '(beng nil (rphf))))
477 (gurmukhi ,(font-spec :registry "iso10646-1" :otf '(guru nil (blwf))))
478 (gujarati ,(font-spec :registry "iso10646-1" :otf '(gujr nil (rphf))))
479 (oriya ,(font-spec :registry "iso10646-1" :otf '(orya nil (rphf))))
480 (tamil ,(font-spec :registry "iso10646-1" :otf '(taml nil (akhn))))
481 (telugu ,(font-spec :registry "iso10646-1" :otf '(telu nil (blwf))))
482 (kannada ,(font-spec :registry "iso10646-1" :otf '(knda nil (rphf))))
483 (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn))))
484 (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn))))
486 (burmese ,(font-spec :registry "iso10646-1" :otf '(mymr nil nil))
487 ,(font-spec :registry "iso10646-1" :script 'burmese))
489 (lao ,(font-spec :registry "iso10646-1" :otf '(lao\ nil nil (mark)))
490 ,(font-spec :registry "iso10646-1" :script 'lao)
493 (tai-viet ("TaiViet" . "iso10646-1"))
495 (greek ,(font-spec :registry "iso10646-1" :script 'greek)
498 (cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic)
500 (nil . "microsoft-cp1251")
503 (arabic ,(font-spec :registry "iso10646-1"
504 :otf '(arab nil (init medi fina liga)))
505 (nil . "MuleArabic-0")
506 (nil . "MuleArabic-1")
507 (nil . "MuleArabic-2")
510 (hebrew ,(font-spec :registry "iso10646-1" :script 'hebrew)
513 (khmer ,(font-spec :registry "iso10646-1" :otf '(khmr nil (pres))))
515 (kana (nil . "JISX0208*")
516 (nil . "GB2312.1980-0")
517 (nil . "KSC5601.1987*")
519 (nil . "JISX0213.2000-1")
520 (nil . "JISX0213.2004-1")
521 ,(font-spec :registry "iso10646-1" :script 'kana))
523 (bopomofo ,(font-spec :registry "iso10646-1" :script 'bopomofo)
524 (nil . "sisheng_cwnn-0"))
526 (han (nil . "GB2312.1980-0")
530 (nil . "KSC5601.1987*")
531 (nil . "CNS11643.1992-1")
532 (nil . "CNS11643.1992-2")
533 (nil . "CNS11643.1992-3")
534 (nil . "CNS11643.1992-4")
535 (nil . "CNS11643.1992-5")
536 (nil . "CNS11643.1992-6")
537 (nil . "CNS11643.1992-7")
540 (nil . "JISX0213.2000-1")
541 (nil . "JISX0213.2000-2")
542 (nil . "JISX0213.2004-1")
543 ,(font-spec :registry "iso10646-1" :lang 'ja)
544 ,(font-spec :registry "iso10646-1" :lang 'zh))
546 (cjk-misc (nil . "GB2312.1980-0")
550 (nil . "KSC5601.1987*")
551 (nil . "CNS11643.1992-1")
552 (nil . "CNS11643.1992-2")
553 (nil . "CNS11643.1992-3")
554 (nil . "CNS11643.1992-4")
555 (nil . "CNS11643.1992-5")
556 (nil . "CNS11643.1992-6")
557 (nil . "CNS11643.1992-7")
560 (nil . "JISX0213.2000-1")
561 (nil . "JISX0213.2000-2")
562 ,(font-spec :registry "iso10646-1" :lang 'ja)
563 ,(font-spec :registry "iso10646-1" :lang 'zh))
565 (hangul (nil . "KSC5601.1987-0")
566 ,(font-spec :registry "iso10646-1" :lang 'ko))
569 (ascii (nil . "ISO8859-1"))
570 (arabic-digit ("*" . "MuleArabic-0"))
571 (arabic-1-column ("*" . "MuleArabic-1"))
572 (arabic-2-column ("*" . "MuleArabic-2"))
573 (indian-is13194 (nil . "is13194-devanagari"))
574 (indian-1-column ("*" . "muleindian-2"))
576 (devanagari-cdac (nil . "Devanagari-CDAC"))
577 (sanskrit-cdac (nil . "Sanskrit-CDAC"))
578 (bengali-cdac (nil . "Bengali-CDAC"))
579 (assamese-cdac (nil . "Assamese-CDAC"))
580 (punjabi-cdac (nil . "Punjabi-CDAC"))
581 (gujarati-cdac (nil . "Gujarati-CDAC"))
582 (oriya-cdac (nil . "Oriya-CDAC"))
583 (tamil-cdac (nil . "Tamil-CDAC"))
584 (telugu-cdac (nil . "Telugu-CDAC"))
585 (kannada-cdac (nil . "Kannada-CDAC"))
586 (malayalam-cdac (nil . "Malayalam-CDAC"))
588 (devanagari-akruti (nil . "Devanagari-Akruti"))
589 (bengali-akruti (nil . "Bengali-Akruti"))
590 (punjabi-akruti (nil . "Punjabi-Akruti"))
591 (gujarati-akruti (nil . "Gujarati-Akruti"))
592 (oriya-akruti (nil . "Oriya-Akruti"))
593 (tamil-akruti (nil . "Tamil-Akruti"))
594 (telugu-akruti (nil . "Telugu-Akruti"))
595 (kannada-akruti (nil . "Kannada-Akruti"))
596 (malayalam-akruti (nil . "Malayalam-Akruti"))
599 (nil (nil . "gb2312.1980")
603 (nil . "ksc5601.1987")
604 (nil . "CNS11643.1992-1")
605 (nil . "CNS11643.1992-2")
606 (nil . "CNS11643.1992-3")
607 (nil . "CNS11643.1992-4")
608 (nil . "CNS11643.1992-5")
609 (nil . "CNS11643.1992-6")
610 (nil . "CNS11643.1992-7")
612 (nil . "jisx0213.2000-1")
613 (nil . "jisx0213.2004-1")
617 ;; For simple scripts
618 (dolist (script '(phonetic
647 cuneiform-numbers-and-punctuation
648 byzantine-musical-symbol
650 ancient-greek-musical-notation
655 (set-fontset-font "fontset-default"
656 script (font-spec :registry "iso10646-1" :script script)
659 ;; Special settings for `MATHEMATICAL (U+1D400..U+1D7FF)'.
660 (dolist (math-subgroup '((#x1D400 #x1D433 mathematical-bold)
661 (#x1D434 #x1D467 mathematical-italic)
662 (#x1D468 #x1D49B mathematical-bold-italic)
663 (#x1D49C #x1D4CF mathematical-script)
664 (#x1D4D0 #x1D503 mathematical-bold-script)
665 (#x1D504 #x1D537 mathematical-fraktur)
666 (#x1D538 #x1D56B mathematical-double-struck)
667 (#x1D56C #x1D59F mathematical-bold-fraktur)
668 (#x1D5A0 #x1D5D3 mathematical-sans-serif)
669 (#x1D5D4 #x1D607 mathematical-sans-serif-bold)
670 (#x1D608 #x1D63B mathematical-sans-serif-italic)
671 (#x1D63C #x1D66F mathematical-sans-serif-bold-italic)
672 (#x1D670 #x1D6A3 mathematical-monospace)
673 (#x1D6A4 #x1D6A5 mathematical-italic)
674 (#x1D6A8 #x1D6E1 mathematical-bold)
675 (#x1D6E2 #x1D71B mathematical-italic)
676 (#x1D71C #x1D755 mathematical-bold-italic)
677 (#x1D756 #x1D78F mathematical-sans-serif-bold)
678 (#x1D790 #x1D7C9 mathematical-sans-serif-bold-italic)
679 (#x1D7CA #x1D7D7 mathematical-bold)
680 (#x1D7D8 #x1D7E1 mathematical-double-struck)
681 (#x1D7E2 #x1D7EB mathematical-sans-serif)
682 (#x1D7EC #x1D7F5 mathematical-sans-serif-bold)
683 (#x1D7F6 #x1D7FF mathematical-monospace)))
684 (let ((slot (assq (nth 2 math-subgroup) script-representative-chars)))
686 (if (vectorp (cdr slot))
687 (setcdr slot (vconcat (cdr slot) (vector (car math-subgroup))))
688 (setcdr slot (vector (cadr slot) (car math-subgroup))))
689 (setq slot (list (nth 2 math-subgroup) (car math-subgroup)))
690 (nconc script-representative-chars (list slot))))
693 (cons (car math-subgroup) (nth 1 math-subgroup))
694 (font-spec :registry "iso10646-1" :script (nth 2 math-subgroup))))
696 ;; Special setup for various symbols and punctuation characters
697 ;; covered well by Symbola, excluding those covered well by popular
698 ;; Unicode fonts. We exclude the latter because users don't like us
699 ;; invading on their font setups where they have good support from
701 (dolist (symbol-subgroup
702 '((#x2000 . #x2012) ;; General Punctuation
708 (#x2070 . #x209F) ;; Superscripts and Subscripts
709 (#x20A0 . #x20AB) ;; Currency Symbols
711 (#x2100 . #x2121) ;; Letterlike Symbols
713 (#x2150 . #x215A) ;; Number Forms
715 (#x2194 . #x21FF) ;; Arrows
716 (#x2200 . #x2211) ;; Mathematical Operators
721 (#x2300 . #x2301) ;; Miscellaneous Technical
725 (#x2400 . #x243F) ;; Control Pictures
726 (#x2440 . #x245F) ;; Optical Char Recognition
727 (#x2460 . #x24FF) ;; Enclosed Alphanumerics
728 (#x25A0 . #x25FF) ;; Geometric Shapes
729 (#x2600 . #x265F) ;; Miscellaneous Symbols
734 (#x2700 . #x27bF) ;; Dingbats
735 (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A
736 (#x27F0 . #x27FF) ;; Supplemental Arrows-A
737 (#x2900 . #x297F) ;; Supplemental Arrows-B
738 (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B
739 (#x2A00 . #x2AFF) ;; Suppl. Math Operators
740 (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows
741 (#x2E00 . #x2E7F) ;; Supplemental Punctuation
742 (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols
743 (#xFE10 . #xFE1F) ;; Vertical Forms
744 (#x10100 . #x1013F) ;; Aegean Numbers
745 (#x102E0 . #x102FF) ;; Coptic Epact Numbers
746 (#x1D000 . #x1D0FF) ;; Byzantine Musical Symbols
747 (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation
748 (#x1F0A0 . #x1F0FF) ;; Playing Cards
749 (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl
750 (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs
751 (#x1F600 . #x1F64F) ;; Emoticons
752 (#x1F650 . #x1F67F) ;; Ornamental Dingbats
753 (#x1F680 . #x1F6FF) ;; Transport and Map Symbols
754 (#x1F700 . #x1F77F) ;; Alchemical Symbols
755 (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended
756 (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C
757 (set-fontset-font "fontset-default" symbol-subgroup "Symbola" nil 'prepend))
758 ;; Box Drawing and Block Elements
759 (set-fontset-font "fontset-default" '(#x2500 . #x259F)
760 "FreeMono" nil 'prepend)
762 ;; Since standard-fontset-spec on X uses fixed-medium font, which
763 ;; gets mapped to a iso8859-1 variant, we would like to prefer its
764 ;; iso10646-1 variant for symbols, where the coverage is known to be
766 (dolist (symbol-subgroup
767 '((#x2000 . #x206F) ;; General Punctuation
768 (#x2070 . #x209F) ;; Superscripts and Subscripts
769 (#x20A0 . #x20CF) ;; Currency Symbols
770 (#x2150 . #x218F) ;; Number Forms
771 (#x2190 . #x21FF) ;; Arrows
772 (#x2200 . #x22FF) ;; Mathematical Operators
773 (#x2300 . #x23FF) ;; Miscellaneous Technical
774 (#x2400 . #x243F) ;; Control Pictures
775 (#x2440 . #x245F) ;; Optical Char Recognition
776 (#x2460 . #x24FF) ;; Enclosed Alphanumerics
777 (#x2500 . #x257F) ;; Box Drawing
778 (#x2580 . #x259F) ;; Block Elements
779 (#x25A0 . #x25FF) ;; Geometric Shapes
780 (#x2600 . #x2689) ;; Miscellaneous Symbols
781 (#x2700 . #x27bF) ;; Dingbats
782 (#x27F5 . #x27FF))) ;; Supplemental Arrows-A
783 (set-fontset-font "fontset-default" symbol-subgroup
784 "-*-fixed-medium-*-*-*-*-*-*-*-*-*-iso10646-1"
787 ;; Append CJK fonts for characters other than han, kana, cjk-misc.
788 ;; Append fonts for scripts whose name is also a charset name.
789 (let* ((data (build-default-fontset-data))
790 (registries (car data)))
791 (dolist (target-spec (cdr data))
792 (let ((target (car target-spec))
793 (spec (cdr target-spec)))
795 (dotimes (i (length registries))
796 (if (> (logand spec (lsh 1 i)) 0)
797 (set-fontset-font "fontset-default" target
798 (cons nil (aref registries i))
801 (set-fontset-font "fontset-default" target
802 (apply 'font-spec args) nil 'append))))))
804 ;; Append Unicode fonts.
805 ;; This may find fonts with more variants (bold, italic) but which
806 ;; don't cover many characters.
807 (set-fontset-font "fontset-default" nil
808 '(nil . "iso10646-1") nil 'prepend)
809 ;; These may find fonts that cover many characters but with fewer
811 (set-fontset-font "fontset-default" nil
812 '("gnu-unifont" . "iso10646-1") nil 'prepend)
813 (set-fontset-font "fontset-default" nil
814 '("mutt-clearlyu" . "iso10646-1") nil 'prepend)
815 (set-fontset-font "fontset-default" '(#x20000 . #x2FFFF)
816 '(nil . "unicode-sip"))
818 (set-fontset-font "fontset-default" '(#xE000 . #xF8FF)
819 '(nil . "iso10646-1"))
820 ;; Don't try the fallback fonts even if no suitable font was found
821 ;; by the above font-spec.
822 (set-fontset-font "fontset-default" '(#xE000 . #xF8FF) nil nil 'append))
824 (defun create-default-fontset ()
825 "Create the default fontset.
826 Internal use only. Should be called at startup time."
828 (setup-default-fontset)
829 (error (display-warning
831 (format "Creation of the default fontsets failed: %s" err)
834 ;; These are the registered registries/encodings from
835 ;; ftp://ftp.x.org/pub/DOCS/registry 2001/06/01
841 ;; "DEC.CNS11643.1986-2" [53]
842 ;; CNS11643 2-plane using the encoding
843 ;; suggested in that standard
844 ;; "DEC.DTSCS.1990-2" [54]
845 ;; DEC Taiwan Supplemental Character Set
846 ;; "fujitsu.u90x01.1991-0" [87]
847 ;; "fujitsu.u90x03.1991-0" [87]
848 ;; "GB2312.1980-0" [39],[12]
849 ;; China (PRC) Hanzi, GL encoding
850 ;; "GB2312.1980-1" [39]
852 ;; China (PRC) Hanzi, GR encoding
854 ;; HPARABIC8 8-bit character set
856 ;; HPEAST8 8-bit character set
858 ;; HPGREEK8 8-bit character set
860 ;; HPHEBREW8 8-bit character set
861 ;; "HP-Japanese15" [36]
862 ;; HPJAPAN15 15-bit character set,
863 ;; modified from industry de facto
864 ;; standard Shift-JIS
866 ;; HPKANA8 8-bit character set
867 ;; "HP-Korean15" [36]
868 ;; HPKOREAN15 15-bit character set
870 ;; HPROMAN8 8-bit character set
871 ;; "HP-SChinese15" [36]
872 ;; HPSCHINA15 15-bit character set for
873 ;; support of Simplified Chinese
874 ;; "HP-TChinese15" [36]
875 ;; HPTCHINA15 15-bit character set for
876 ;; support of Traditional Chinese
877 ;; "HP-Turkish8" [36]
878 ;; HPTURKISH8 8-bit character set
882 ;; "ISO2022"<REG>"-"<ENC> [44]
883 ;; "ISO646.1991-IRV" [107]
884 ;; ISO 646 International Reference Version
885 ;; "ISO8859-1" [15],[12]
886 ;; ISO Latin alphabet No. 1
887 ;; "ISO8859-2" [15],[12]
888 ;; ISO Latin alphabet No. 2
889 ;; "ISO8859-3" [15],[12]
890 ;; ISO Latin alphabet No. 3
891 ;; "ISO8859-4" [15],[12]
892 ;; ISO Latin alphabet No. 4
893 ;; "ISO8859-5" [15],[12]
894 ;; ISO Latin/Cyrillic alphabet
895 ;; "ISO8859-6" [15],[12]
896 ;; ISO Latin/Arabic alphabet
897 ;; "ISO8859-7" [15],[12]
898 ;; ISO Latin/Greek alphabet
899 ;; "ISO8859-8" [15],[12]
900 ;; ISO Latin/Hebrew alphabet
901 ;; "ISO8859-9" [15],[12]
902 ;; ISO Latin alphabet No. 5
903 ;; "ISO8859-10" [15],[12]
904 ;; ISO Latin alphabet No. 6
905 ;; "ISO8859-13" [15],[12]
906 ;; ISO Latin alphabet No. 7
907 ;; "ISO8859-14" [15],[12]
908 ;; ISO Latin alphabet No. 8
909 ;; "ISO8859-15" [15],[12]
910 ;; ISO Latin alphabet No. 9
913 ;; ISO Latin alphabet No. 9, Final Committee Draft
914 ;; "ISO10646-1" [133]
915 ;; Unicode Universal Multiple-Octet Coded Character Set
916 ;; "ISO10646-MES" [133]
918 ;; Unicode Minimum European Subset
919 ;; "JISX0201.1976-0" [38],[12]
920 ;; 8-Bit Alphanumeric-Katakana Code
921 ;; "JISX0208.1983-0" [40],[12]
922 ;; Japanese Graphic Character Set,
924 ;; "JISX0208.1990-0" [71]
925 ;; Japanese Graphic Character Set,
927 ;; "JISX0208.1983-1" [40]
929 ;; Japanese Graphic Character Set,
931 ;; "JISX0212.1990-0" [72]
932 ;; Supplementary Japanese Graphic Character Set,
936 ;; "KSC5601.1987-0" [41],[12]
937 ;; Korean Graphic Character Set,
939 ;; "KSC5601.1987-1" [41]
941 ;; Korean Graphic Character Set,
943 ;; "omron_CNS11643-0" [45]
944 ;; "omron_CNS11643-1" [45]
945 ;; "omron_BIG5-0" [45]
946 ;; "omron_BIG5-1" [45]
947 ;; "wn.tamil.1993" [103]
949 (defun set-font-encoding (pattern charset)
950 "Set arguments in `font-encoding-alist' (which see)."
951 (let ((slot (assoc pattern font-encoding-alist)))
953 (setcdr slot charset)
954 (setq font-encoding-alist
955 (cons (cons pattern charset) font-encoding-alist)))))
957 (defvar x-pixel-size-width-font-regexp)
958 (defvar vertical-centering-font-regexp)
960 ;; Setting for suppressing XLoadQueryFont on big fonts.
961 (setq x-pixel-size-width-font-regexp
962 (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5"))
964 ;; These fonts require vertical centering.
965 (setq vertical-centering-font-regexp
966 (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5"))
967 (put 'vertical-centering-font-regexp 'standard-value
968 (list vertical-centering-font-regexp))
970 ;; CDAC fonts are actually smaller than their design sizes.
971 (setq face-font-rescale-alist
972 (list (cons (purecopy "-cdac$") 1.3)))
974 (defvar x-font-name-charset-alist nil
975 "This variable has no meaning now. Just kept for backward compatibility.")
977 ;;; XLFD (X Logical Font Description) format handler.
979 ;; Define XLFD's field index numbers. ; field name
980 (defconst xlfd-regexp-family-subnum 0) ; FOUNDRY and FAMILY
981 (defconst xlfd-regexp-weight-subnum 1) ; WEIGHT_NAME
982 (defconst xlfd-regexp-slant-subnum 2) ; SLANT
983 (defconst xlfd-regexp-swidth-subnum 3) ; SETWIDTH_NAME
984 (defconst xlfd-regexp-adstyle-subnum 4) ; ADD_STYLE_NAME
985 (defconst xlfd-regexp-pixelsize-subnum 5) ; PIXEL_SIZE
986 (defconst xlfd-regexp-pointsize-subnum 6) ; POINT_SIZE
987 (defconst xlfd-regexp-resx-subnum 7) ; RESOLUTION_X
988 (defconst xlfd-regexp-resy-subnum 8) ; RESOLUTION_Y
989 (defconst xlfd-regexp-spacing-subnum 8) ; SPACING
990 (defconst xlfd-regexp-avgwidth-subnum 10) ; AVERAGE_WIDTH
991 (defconst xlfd-regexp-registry-subnum 11) ; REGISTRY and ENCODING
993 ;; Regular expression matching against a fontname which conforms to
994 ;; XLFD (X Logical Font Description). All fields in XLFD should be
995 ;; not be omitted (but can be a wild card) to be matched.
996 (defconst xlfd-tight-regexp
998 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\
999 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)\
1000 -\\([^-]*\\)-\\([^-]*\\)-\\([^-]*-[^-]*\\)$")
1002 ;; Regular expression matching against a fontname which conforms to
1003 ;; XLFD (X Logical Font Description). All fields in XLFD from FOUNDRY
1004 ;; to ADSTYLE, REGISTRY, and ENCODING should be not be omitted (but
1005 ;; can be a wild card) to be matched.
1006 (defconst xlfd-style-regexp
1008 -\\([^-]*-[^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-\\([^-]*\\)-.*\
1009 -\\([^-]*-[^-]*\\)$")
1011 ;; List of field numbers of XLFD whose values are numeric.
1012 (defconst xlfd-regexp-numeric-subnums
1013 (list xlfd-regexp-pixelsize-subnum ;5
1014 xlfd-regexp-pointsize-subnum ;6
1015 xlfd-regexp-resx-subnum ;7
1016 xlfd-regexp-resy-subnum ;8
1017 xlfd-regexp-avgwidth-subnum ;10
1020 (defun x-decompose-font-name (pattern)
1021 "Decompose PATTERN into XLFD fields and return a vector of the fields.
1022 The length of the vector is 12.
1023 The FOUNDRY and FAMILY fields are concatenated and stored in the first
1024 element of the vector.
1025 The REGISTRY and ENCODING fields are concatenated and stored in the last
1026 element of the vector.
1028 Return nil if PATTERN doesn't conform to XLFD."
1029 (if (string-match xlfd-tight-regexp pattern)
1030 (let ((xlfd-fields (make-vector 12 nil)))
1032 (aset xlfd-fields i (match-string (1+ i) pattern)))
1034 (if (string-match "^[*-]+$" (aref xlfd-fields i))
1035 (aset xlfd-fields i nil)))
1038 (defun x-compose-font-name (fields &optional _reduce)
1039 "Compose X fontname from FIELDS.
1040 FIELDS is a vector of XLFD fields, of length 12.
1041 If a field is nil, wild-card letter `*' is embedded.
1042 Optional argument REDUCE exists just for backward compatibility,
1043 and is always ignored."
1044 (concat "-" (mapconcat (lambda (x) (or x "*")) fields "-")))
1047 (defun x-must-resolve-font-name (xlfd-fields)
1048 "Like `x-resolve-font-name', but always return a font name.
1049 XLFD-FIELDS is a vector of XLFD (X Logical Font Description) fields.
1050 If no font matching XLFD-FIELDS is available, successively replace
1051 parts of the font name pattern with \"*\" until some font is found.
1052 Value is name of that font."
1053 (let ((ascii-font nil) (index 0))
1054 (while (and (null ascii-font) (<= index xlfd-regexp-registry-subnum))
1055 (let ((pattern (x-compose-font-name xlfd-fields)))
1057 (setq ascii-font (x-resolve-font-name pattern))
1059 (message "Warning: no fonts matching `%s' available" pattern)
1060 (aset xlfd-fields index "*")
1061 (setq index (1+ index))))))
1063 (error "No fonts found"))
1067 (defun x-complement-fontset-spec (default-spec fontlist)
1068 "Complement elements of FONTLIST based on DEFAULT-SPEC.
1069 DEFAULT-SPEC is a font-spec object providing default font properties.
1070 FONTLIST is an alist of script names vs the corresponding font names.
1072 The font names are parsed and unspecified font properties are
1073 given from DEFAULT-SPEC."
1074 (let ((prop-list '(:foundry :family :weight :slant :width :adstyle :size)))
1075 (dolist (elt fontlist)
1076 (let ((spec (font-spec :name (cadr elt))))
1077 (dolist (prop prop-list)
1078 (let ((val (font-get spec prop)))
1080 (font-put spec prop (font-get default-spec prop)))))
1081 (setcar (cdr elt) spec)))
1084 (defun fontset-name-p (fontset)
1085 "Return non-nil if FONTSET is valid as fontset name.
1086 A valid fontset name should conform to XLFD (X Logical Font Description)
1087 with \"fontset\" in `<CHARSET_REGISTRY>' field."
1088 (and (string-match xlfd-tight-regexp fontset)
1089 (string= (match-string (1+ xlfd-regexp-registry-subnum) fontset)
1092 (declare-function fontset-list "fontset.c" ())
1094 (defun generate-fontset-menu ()
1095 "Return list to be appended to `x-fixed-font-alist'.
1096 Done when `mouse-set-font' is called."
1098 (dolist (fontset (fontset-list))
1099 (or (string-match "fontset-default$" fontset)
1100 (string-match "fontset-auto[0-9]+$" fontset)
1101 (push (list (fontset-plain-name fontset) fontset) l)))
1103 (sort l #'(lambda (x y) (string< (car x) (car y)))))))
1105 (declare-function query-fontset "fontset.c" (pattern &optional regexpp))
1107 (defun fontset-plain-name (fontset)
1108 "Return a plain and descriptive name of FONTSET."
1109 (if (not (setq fontset (query-fontset fontset)))
1110 (error "Invalid fontset: %s" fontset))
1111 (let ((xlfd-fields (x-decompose-font-name fontset)))
1113 (let ((family (aref xlfd-fields xlfd-regexp-family-subnum))
1114 (weight (aref xlfd-fields xlfd-regexp-weight-subnum))
1115 (slant (aref xlfd-fields xlfd-regexp-slant-subnum))
1116 ;(swidth (aref xlfd-fields xlfd-regexp-swidth-subnum))
1117 (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum))
1118 (nickname (aref xlfd-fields xlfd-regexp-registry-subnum))
1120 (if (not (string-match "^fontset-\\(.*\\)$" nickname))
1121 (setq nickname family)
1122 (setq nickname (match-string 1 nickname)))
1123 (if (and size (> (string-to-number size) 0))
1124 (setq name (format "%s: %s-dot" nickname size))
1125 (setq name nickname))
1127 (cond ((string-match "^medium$" weight)
1128 (setq name (concat name " " "medium")))
1129 ((string-match "^bold$\\|^demibold$" weight)
1130 (setq name (concat name " " weight)))))
1132 (cond ((string-match "^i$" slant)
1133 (setq name (concat name " " "italic")))
1134 ((string-match "^o$" slant)
1135 (setq name (concat name " " "slant")))
1136 ((string-match "^ri$" slant)
1137 (setq name (concat name " " "reverse italic")))
1138 ((string-match "^ro$" slant)
1139 (setq name (concat name " " "reverse slant")))))
1143 (defvar charset-script-alist
1145 (latin-iso8859-1 . latin)
1146 (latin-iso8859-2 . latin)
1147 (latin-iso8859-3 . latin)
1148 (latin-iso8859-4 . latin)
1149 (latin-iso8859-9 . latin)
1150 (latin-iso8859-10 . latin)
1151 (latin-iso8859-13 . latin)
1152 (latin-iso8859-14 . latin)
1153 (latin-iso8859-15 . latin)
1154 (latin-iso8859-16 . latin)
1155 (latin-jisx0201 . latin)
1156 (thai-tis620 . thai)
1157 (cyrillic-iso8859-5 . cyrillic)
1158 (arabic-iso8859-6 . arabic)
1159 (greek-iso8859-7 . latin)
1160 (hebrew-iso8859-8 . latin)
1161 (katakana-jisx0201 . kana)
1162 (chinese-gb2312 . han)
1164 (gb18030-2-byte . han)
1165 (gb18030-4-byte-bmp . han)
1166 (gb18030-4-byte-ext-1 . han)
1167 (gb18030-4-byte-ext-2 . han)
1168 (gb18030-4-byte-smp . han)
1169 (chinese-big5-1 . han)
1170 (chinese-big5-2 . han)
1171 (chinese-cns11643-1 . han)
1172 (chinese-cns11643-2 . han)
1173 (chinese-cns11643-3 . han)
1174 (chinese-cns11643-4 . han)
1175 (chinese-cns11643-5 . han)
1176 (chinese-cns11643-6 . han)
1177 (chinese-cns11643-7 . han)
1178 (japanese-jisx0208 . han)
1179 (japanese-jisx0208-1978 . han)
1180 (japanese-jisx0212 . han)
1181 (japanese-jisx0213-1 . han)
1182 (japanese-jisx0213-2 . han)
1183 (korean-ksc5601 . hangul)
1184 (chinese-sisheng . bopomofo)
1185 (vietnamese-viscii-lower . latin)
1186 (vietnamese-viscii-upper . latin)
1187 (arabic-digit . arabic)
1188 (arabic-1-column . arabic)
1189 (arabic-2-column . arabic)
1190 (indian-is13194 . devanagari)
1191 (indian-glyph . devanagari)
1192 (indian-1-column . devanagari)
1193 (indian-2-column . devanagari)
1194 (tibetan-1-column . tibetan))
1195 "Alist of charsets vs the corresponding most appropriate scripts.
1197 This alist is used by the function `create-fontset-from-fontset-spec'
1198 to map charsets to scripts.")
1200 (defun create-fontset-from-fontset-spec (fontset-spec
1201 &optional _style-variant _noerror)
1202 "Create a fontset from fontset specification string FONTSET-SPEC.
1203 FONTSET-SPEC is a string of the format:
1204 FONTSET-NAME,SCRIPT-NAME0:FONT-NAME0,SCRIPT-NAME1:FONT-NAME1, ...
1205 Any number of SPACE, TAB, and NEWLINE can be put before and after commas.
1207 When a frame uses the fontset as the `font' parameter, the frame's
1208 default font name is derived from FONTSET-NAME by substituting
1209 \"iso8859-1\" for the tail part \"fontset-XXX\". But, if SCRIPT-NAMEn
1210 is \"ascii\", use the corresponding FONT-NAMEn as the default font
1213 Optional 2nd and 3rd arguments exist just for backward compatibility,
1216 It returns a name of the created fontset.
1218 For backward compatibility, SCRIPT-NAME may be a charset name, in
1219 which case, the corresponding script is decided by the variable
1220 `charset-script-alist' (which see)."
1221 (or (string-match "^[^,]+" fontset-spec)
1222 (error "Invalid fontset spec: %s" fontset-spec))
1223 (let ((idx (match-end 0))
1224 (name (match-string 0 fontset-spec))
1225 default-spec target script fontlist)
1226 (or (string-match xlfd-tight-regexp name)
1227 (error "Fontset name \"%s\" not conforming to XLFD" name))
1228 (setq default-spec (font-spec :name name))
1229 ;; At first, extract pairs of charset and fontname from FONTSET-SPEC.
1230 (while (string-match "[, \t\n]*\\([^:]+\\):[ \t]*\\([^,]+\\)"
1232 (setq idx (match-end 0))
1233 (setq target (intern (match-string 1 fontset-spec)))
1234 (cond ((or (eq target 'ascii)
1235 (memq target (char-table-extra-slot char-script-table 0)))
1236 (push (list target (match-string 2 fontset-spec)) fontlist))
1237 ((setq script (cdr (assq target charset-script-alist)))
1238 (push (list script (match-string 2 fontset-spec)) fontlist))
1240 (push (list target (match-string 2 fontset-spec)) fontlist))))
1242 ;; Complement FONTLIST.
1243 (setq fontlist (x-complement-fontset-spec default-spec fontlist))
1245 ;; Create a fontset.
1246 (new-fontset name (nreverse fontlist))))
1248 (defun create-fontset-from-ascii-font (font &optional resolved-font
1250 "Create a fontset from an ASCII font FONT.
1252 Optional 2nd arg RESOLVED-FONT is a resolved name of FONT.
1253 If omitted, `x-resolve-font-name' is called to get the resolved name.
1254 At this time, if FONT is not available, an error is signaled.
1256 Optional 3rd arg FONTSET-NAME is a string to be used in
1257 `<CHARSET_ENCODING>' fields of a new fontset name. If it is omitted,
1258 an appropriate name is generated automatically.
1260 It returns a name of the created fontset."
1261 (setq font (downcase font))
1263 (downcase (or resolved-font (x-resolve-font-name font))))
1264 (let ((xlfd (x-decompose-font-name resolved-font))
1267 (setq fontset-name (downcase fontset-name))
1268 (if (query-fontset "fontset-startup")
1270 (subst-char-in-string
1271 ?- ?_ (aref xlfd xlfd-regexp-registry-subnum) t))
1272 (setq fontset-name "startup")))
1273 (aset xlfd xlfd-regexp-registry-subnum
1274 (format "fontset-%s" fontset-name))
1275 (setq fontset (x-compose-font-name xlfd))
1276 (or (query-fontset fontset)
1277 (create-fontset-from-fontset-spec (concat fontset ", ascii:" font)))))
1280 ;; Create standard fontset from 16 dots fonts which are the most widely
1281 ;; installed fonts. Fonts for Chinese-GB, Korean, and Chinese-CNS are
1282 ;; specified here because FAMILY of those fonts are not "fixed" in
1284 (defvar standard-fontset-spec
1285 (purecopy "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard")
1286 "String of fontset spec of the standard fontset.
1287 You have the biggest chance to display international characters
1288 with correct glyphs by using the standard fontset.
1289 See the documentation of `create-fontset-from-fontset-spec' for the format.")
1292 ;; Create fontsets from X resources of the name `fontset-N (class
1293 ;; Fontset-N)' where N is integer 0, 1, ...
1294 ;; The values of the resources the string of the same format as
1295 ;; `standard-fontset-spec'.
1297 (declare-function x-get-resource "frame.c"
1298 (attribute class &optional component subclass))
1300 (defun create-fontset-from-x-resource ()
1303 (while (setq fontset-spec (x-get-resource (format "fontset-%d" idx)
1304 (format "Fontset-%d" idx)))
1306 (create-fontset-from-fontset-spec fontset-spec t)
1307 (error (display-warning
1309 (format "Fontset-%d: invalid specification in X resource" idx)
1311 (setq idx (1+ idx)))))
1316 ;;; fontset.el ends here