changeset 17838:b726d209302c

Create bold, italic, bold-italic variants of startup fontset.
author Kenichi Handa <handa@m17n.org>
date Fri, 16 May 1997 00:58:58 +0000
parents a4d3078a83e9
children b4a81f70d905
files lisp/term/x-win.el
diffstat 1 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/x-win.el	Fri May 16 00:58:57 1997 +0000
+++ b/lisp/term/x-win.el	Fri May 16 00:58:58 1997 +0000
@@ -648,12 +648,12 @@
 
 (if (fboundp 'new-fontset)
     (progn
-      ;; Create a default fontset.
-      (create-fontset-from-fontset-spec default-fontset-spec)
-      ;; Create variants of a default fontset.
-      (create-fontset-from-fontset-spec default-fontset-spec 'bold)
-      (create-fontset-from-fontset-spec default-fontset-spec 'italic)
-      (create-fontset-from-fontset-spec default-fontset-spec 'bold-italic)
+      ;; Create the standard fontset.
+      (create-fontset-from-fontset-spec standard-fontset-spec)
+      ;; Create variants of the standard fontset.
+      (create-fontset-from-fontset-spec standard-fontset-spec 'bold)
+      (create-fontset-from-fontset-spec standard-fontset-spec 'italic)
+      (create-fontset-from-fontset-spec standard-fontset-spec 'bold-italic)
 
       ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
       (create-fontset-from-x-resource)
@@ -669,30 +669,30 @@
       (let ((font (or (cdr (assq 'font initial-frame-alist))
 		      (cdr (assq 'font default-frame-alist))
 		      (x-get-resource "font" "Font")))
-	    xlfd-fields fontlist)
+	    xlfd-fields)
 	(if (and font
 		 (not (query-fontset font))
 		 (setq xlfd-fields (x-decompose-font-name font)))
-	    (let (alias)
-	      (or (string= "fontset"
-			   (aref xlfd-fields xlfd-regexp-registry-subnum))
-		  (progn
-		    ;; Create a fontset from FONT.  The name is also
-		    ;; generated from FONT.
-		    (setq fontlist (list (cons 'ascii font)))
-		    (aset xlfd-fields xlfd-regexp-foundry-subnum nil)
-		    (aset xlfd-fields xlfd-regexp-family-subnum nil)
-		    (aset xlfd-fields xlfd-regexp-adstyle-subnum nil)
-		    (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil)
-		    (aset xlfd-fields xlfd-regexp-registry-subnum "fontset")
-		    (aset xlfd-fields xlfd-regexp-encoding-subnum "startup")
-		    (setq alias font
-			  font (x-compose-font-name xlfd-fields))))
-	      (new-fontset font
-			   (x-complement-fontset-spec xlfd-fields fontlist))
-	      (if alias
-		  (setq fontset-alias-alist
-			(cons (cons font alias) fontset-alias-alist)))
+	    (if (string= "fontset"
+			 (aref xlfd-fields xlfd-regexp-registry-subnum))
+		(new-fontset font (x-complement-fontset-spec xlfd-fields nil))
+	      (let (fontset fontset-spec)
+		;; Create a fontset from FONT.  The name is also
+		;; generated from FONT.
+		(aset xlfd-fields xlfd-regexp-foundry-subnum nil)
+		(aset xlfd-fields xlfd-regexp-family-subnum nil)
+		(aset xlfd-fields xlfd-regexp-adstyle-subnum nil)
+		(aset xlfd-fields xlfd-regexp-avgwidth-subnum nil)
+		(aset xlfd-fields xlfd-regexp-registry-subnum "fontset")
+		(aset xlfd-fields xlfd-regexp-encoding-subnum "startup")
+		(setq fontset (x-compose-font-name xlfd-fields))
+		(setq fontset-spec (concat fontset ", ascii:" font))
+		(create-fontset-from-fontset-spec fontset-spec)
+		(create-fontset-from-fontset-spec fontset-spec 'bold)
+		(create-fontset-from-fontset-spec fontset-spec 'italic)
+		(create-fontset-from-fontset-spec fontset-spec 'bold-italic)
+		(setq fontset-alias-alist
+		      (cons (cons fontset font) fontset-alias-alist)))
 	      )))))
 
 ;; Sun expects the menu bar cut and paste commands to use the clipboard.