]> code.delx.au - gnu-emacs/commitdiff
Generate style variants fontset for
authorKenichi Handa <handa@m17n.org>
Thu, 21 May 1998 01:47:32 +0000 (01:47 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 21 May 1998 01:47:32 +0000 (01:47 +0000)
standard-fontset-spec.  Generate a fontset based on resolved font
name of a font specified by X resource or -fn command line arg.

lisp/term/x-win.el

index 1557a6dd5bfe6f82282a447ed71e360e35dfd89b..2d3a0a983593886d50ef49ae8260d68099d57861 100644 (file)
@@ -658,7 +658,7 @@ This is in addition to the primary selection.")
 (if (fboundp 'new-fontset)
     (progn
       ;; Create the standard fontset.
-      (create-fontset-from-fontset-spec standard-fontset-spec)
+      (create-fontset-from-fontset-spec standard-fontset-spec t)
 
       ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
       (create-fontset-from-x-resource)
@@ -674,10 +674,11 @@ This is in addition to the primary selection.")
       (let ((font (or (cdr (assq 'font initial-frame-alist))
                      (cdr (assq 'font default-frame-alist))
                      (x-get-resource "font" "Font")))
-           xlfd-fields)
+           resolved-name xlfd-fields)
        (if (and font
                 (not (query-fontset font))
-                (setq xlfd-fields (x-decompose-font-name font)))
+                (setq resolved-name (or (x-resolve-font-name font) font))
+                (setq xlfd-fields (x-decompose-font-name resolved-name)))
            (if (string= "fontset"
                         (aref xlfd-fields xlfd-regexp-registry-subnum))
                (new-fontset font (x-complement-fontset-spec xlfd-fields nil))
@@ -691,7 +692,7 @@ This is in addition to the primary selection.")
                (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))
+               (setq fontset-spec (concat fontset ", ascii:" resolved-name))
                (create-fontset-from-fontset-spec fontset-spec t)
                (setq fontset-alias-alist
                      (cons (cons fontset font) fontset-alias-alist)))