changeset 89325:58d5f88f985b

(x-complement-fontset-spec): If a fontname doesn't conform to XLFD format, try to get XLFD name by x-list-fonts.
author Kenichi Handa <handa@m17n.org>
date Mon, 06 Jan 2003 01:12:14 +0000
parents 7f05ba2b8954
children 59c6c749d00c
files lisp/international/fontset.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/fontset.el	Fri Jan 03 20:25:06 2003 +0000
+++ b/lisp/international/fontset.el	Mon Jan 06 01:12:14 2003 +0000
@@ -552,7 +552,9 @@
     (dolist (elt fontlist)
       (let ((name (cadr elt))
 	    font-spec)
-	(when (string-match xlfd-style-regexp name)
+	(when (or (string-match xlfd-style-regexp name)
+		  (and (setq name (car (x-list-fonts name nil nil 1)))
+		       (string-match xlfd-style-regexp name)))
 	  (setq font-spec (make-vector 6 nil))
 	  (dotimes (i 6)
 	    (aset font-spec i (match-string (1+ i) name)))