changeset 34917:989f2f0c8a7e

(x-complement-fontset-spec): Resolve ASCII font name so that the same family name is used for fonts registered in x-font-name-charset-alist. (create-fontset-from-fontset-spec): Adjusted for the above change. The name of fontset alias should be a unresolved ASCII font name.
author Kenichi Handa <handa@m17n.org>
date Fri, 29 Dec 2000 06:14:42 +0000
parents e88de604d59f
children 3256440cb4bf
files lisp/international/fontset.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/fontset.el	Fri Dec 29 06:13:53 2000 +0000
+++ b/lisp/international/fontset.el	Fri Dec 29 06:14:42 2000 +0000
@@ -314,13 +314,14 @@
 
 If a font specifid for ASCII supports the other charsets (see the
 variable `x-font-name-charset-alist'), add that information to FONTLIST."
-  (let ((ascii-font (cdr (assq 'ascii fontlist))))
-
-    ;; If font for ASCII is not specified, add it.
-    (unless ascii-font
+  (let* ((slot (assq 'ascii fontlist))
+	 (ascii-font (cdr slot)))
+    (if ascii-font
+	(setcdr slot (setq ascii-font (x-resolve-font-name ascii-font)))
+      ;; If font for ASCII is not specified, add it.
       (aset xlfd-fields xlfd-regexp-registry-subnum "iso8859")
       (aset xlfd-fields xlfd-regexp-encoding-subnum "1")
-      (setq ascii-font (x-compose-font-name xlfd-fields))
+      (setq ascii-font (x-resolve-font-name (x-compose-font-name xlfd-fields)))
       (setq fontlist (cons (cons 'ascii ascii-font) fontlist)))
 
     ;; If the font for ASCII also supports the other charsets, and
@@ -428,6 +429,7 @@
 	(if (charsetp charset)
 	    (setq fontlist (cons (cons charset (match-string 2 fontset-spec))
 				 fontlist))))
+      (setq ascii-font (cdr (assq 'ascii fontlist)))
 
       ;; Complement FONTLIST.
       (setq fontlist (x-complement-fontset-spec xlfd-fields fontlist))
@@ -443,7 +445,8 @@
 		      (cons (cons name alias) fontset-alias-alist)))))
 
       ;; Define the ASCII font name alias.
-      (setq ascii-font (cdr (assq 'ascii fontlist)))
+      (or ascii-font
+	  (setq ascii-font (cdr (assq 'ascii fontlist))))
       (or (rassoc ascii-font fontset-alias-alist)
 	  (setq fontset-alias-alist
 		(cons (cons name ascii-font)