changeset 22618:ed91f54d85b9

(create-fontset-from-fontset-spec): Generate ASCII font names of style variants fontsets from a resolved ASCII font name of a base fontset.
author Kenichi Handa <handa@m17n.org>
date Fri, 26 Jun 1998 03:29:58 +0000
parents bcb4a7a67d13
children e64ada9fc033
files lisp/international/fontset.el
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/fontset.el	Fri Jun 26 03:29:58 1998 +0000
+++ b/lisp/international/fontset.el	Fri Jun 26 03:29:58 1998 +0000
@@ -461,7 +461,7 @@
       (error "Invalid fontset spec: %s" fontset-spec))
   (let ((idx (match-end 0))
 	(name (match-string 0 fontset-spec))
-	fontlist full-fontlist ascii-font charset)
+	fontlist full-fontlist ascii-font resolved-ascii-font charset)
     (if (query-fontset name)
 	(or noerror 
 	    (error "Fontset \"%s\" already exists"))
@@ -493,14 +493,14 @@
 	      (or (rassoc alias fontset-alias-alist)
 		  (setq fontset-alias-alist
 			(cons (cons name alias) fontset-alias-alist)))))
-	(let ((resolved-ascii-font (cdr (assq 'ascii full-fontlist))))
-	  (setq fontset-alias-alist
-		(cons (cons name resolved-ascii-font)
-		      fontset-alias-alist))
-	  (or (equal ascii-font resolved-ascii-font)
-	      (setq fontset-alias-alist
-		    (cons (cons name ascii-font)
-			  fontset-alias-alist))))
+	(setq resolved-ascii-font (cdr (assq 'ascii full-fontlist)))
+	(setq fontset-alias-alist
+	      (cons (cons name resolved-ascii-font)
+		    fontset-alias-alist))
+	(or (equal ascii-font resolved-ascii-font)
+	    (setq fontset-alias-alist
+		  (cons (cons name ascii-font)
+			fontset-alias-alist)))
 
 	;; At last, handle style variants.
 	(if (eq style-variant t)
@@ -526,7 +526,8 @@
 		(when new-name
 		  ;; Modify ASCII font name for the style...
 		  (setq new-ascii-font
-			(or font (x-modify-font-name ascii-font style)))
+			(or font
+			    (x-modify-font-name resolved-ascii-font style)))
 		  ;; but leave fonts for the other charsets unmodified
 		  ;; for the momemnt.  They are modified for the style
 		  ;; in instantiate-fontset.