aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2002-08-19 06:12:31 +0000
committerKenichi Handa2002-08-19 06:12:31 +0000
commit87997c2cd15f69ecd2b587428792a4ccb4d548fb (patch)
treef2b7f0aed01d4812d452a1c9a8de4f6ffe7d2c0a
parentf2b89e21fa128a8685fd1dd09d5fc0126b2ade58 (diff)
downloademacs-87997c2cd15f69ecd2b587428792a4ccb4d548fb.tar.gz
emacs-87997c2cd15f69ecd2b587428792a4ccb4d548fb.zip
(fontset-plain-name): If the fontset
name doesn't ends with "-fontset-*", use family name as the first part of the plain name. (create-fontset-from-ascii-font): If "fontset-startup" is not yet created, use that name for the fontset. Fix arguments to subst-char-in-string.
-rw-r--r--lisp/international/fontset.el54
1 files changed, 28 insertions, 26 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index c2ca80a1d4e..31bc0e223e5 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -103,8 +103,6 @@
103(new-fontset 103(new-fontset
104 "fontset-default" 104 "fontset-default"
105 '( ;; for each script 105 '( ;; for each script
106 (ascii (nil . "ISO8859-1"))
107
108 (latin (nil . "ISO8859-1") 106 (latin (nil . "ISO8859-1")
109 (nil . "ISO8859-2") 107 (nil . "ISO8859-2")
110 (nil . "ISO8859-3") 108 (nil . "ISO8859-3")
@@ -179,6 +177,7 @@
179 (hangul (nil . "KSC5601.1987-0")) 177 (hangul (nil . "KSC5601.1987-0"))
180 178
181 ;; for each charset 179 ;; for each charset
180 (ascii (nil . "ISO8859-1"))
182 (arabic-digit ("*" . "MuleArabic-0")) 181 (arabic-digit ("*" . "MuleArabic-0"))
183 (arabic-1-column ("*" . "MuleArabic-1")) 182 (arabic-1-column ("*" . "MuleArabic-1"))
184 (arabic-2-column ("*" . "MuleArabic-2")) 183 (arabic-2-column ("*" . "MuleArabic-2"))
@@ -443,33 +442,34 @@ with \"fontset\" in `<CHARSET_REGISTRY> field."
443 (error "Invalid fontset: %s" fontset)) 442 (error "Invalid fontset: %s" fontset))
444 (let ((xlfd-fields (x-decompose-font-name fontset))) 443 (let ((xlfd-fields (x-decompose-font-name fontset)))
445 (if xlfd-fields 444 (if xlfd-fields
446 (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum)) 445 (let ((family (aref xlfd-fields xlfd-regexp-family-subnum))
446 (weight (aref xlfd-fields xlfd-regexp-weight-subnum))
447 (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) 447 (slant (aref xlfd-fields xlfd-regexp-slant-subnum))
448 (swidth (aref xlfd-fields xlfd-regexp-swidth-subnum)) 448 (swidth (aref xlfd-fields xlfd-regexp-swidth-subnum))
449 (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum)) 449 (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum))
450 (nickname (aref xlfd-fields xlfd-regexp-registry-subnum)) 450 (nickname (aref xlfd-fields xlfd-regexp-registry-subnum))
451 name) 451 name)
452 (if (not (string-match "^fontset-\\(.*\\)$" nickname)) 452 (if (not (string-match "^fontset-\\(.*\\)$" nickname))
453 fontset 453 (setq nickname family)
454 (setq nickname (match-string 1 nickname)) 454 (setq nickname (match-string 1 nickname)))
455 (if (and size (> (string-to-int size) 0)) 455 (if (and size (> (string-to-int size) 0))
456 (setq name (format "%s: %s-dot" nickname size)) 456 (setq name (format "%s: %s-dot" nickname size))
457 (setq name nickname)) 457 (setq name nickname))
458 (and weight 458 (and weight
459 (cond ((string-match "^medium$" weight) 459 (cond ((string-match "^medium$" weight)
460 (setq name (concat name " " "medium"))) 460 (setq name (concat name " " "medium")))
461 ((string-match "^bold$\\|^demibold$" weight) 461 ((string-match "^bold$\\|^demibold$" weight)
462 (setq name (concat name " " weight))))) 462 (setq name (concat name " " weight)))))
463 (and slant 463 (and slant
464 (cond ((string-match "^i$" slant) 464 (cond ((string-match "^i$" slant)
465 (setq name (concat name " " "italic"))) 465 (setq name (concat name " " "italic")))
466 ((string-match "^o$" slant) 466 ((string-match "^o$" slant)
467 (setq name (concat name " " "slant"))) 467 (setq name (concat name " " "slant")))
468 ((string-match "^ri$" slant) 468 ((string-match "^ri$" slant)
469 (setq name (concat name " " "reverse italic"))) 469 (setq name (concat name " " "reverse italic")))
470 ((string-match "^ro$" slant) 470 ((string-match "^ro$" slant)
471 (setq name (concat name " " "reverse slant"))))) 471 (setq name (concat name " " "reverse slant")))))
472 name)) 472 name)
473 fontset))) 473 fontset)))
474 474
475(defvar charset-script-alist 475(defvar charset-script-alist
@@ -607,9 +607,11 @@ It returns a name of the created fontset."
607 fontset) 607 fontset)
608 (if fontset-name 608 (if fontset-name
609 (setq fontset-name (downcase fontset-name)) 609 (setq fontset-name (downcase fontset-name))
610 (setq fontset-name 610 (if (query-fontset "fontset-startup")
611 (subst-char-in-string 611 (setq fontset-name
612 "-" "_" (aref xlfd xlfd-regexp-registry-subnum) t))) 612 (subst-char-in-string
613 ?- ?_ (aref xlfd xlfd-regexp-registry-subnum) t))
614 (setq fontset-name "startup")))
613 (aset xlfd xlfd-regexp-registry-subnum 615 (aset xlfd xlfd-regexp-registry-subnum
614 (format "fontset-%s" fontset-name)) 616 (format "fontset-%s" fontset-name))
615 (setq fontset (x-compose-font-name xlfd)) 617 (setq fontset (x-compose-font-name xlfd))