]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-complement-fontset-spec): If a fontname doesn't conform to XLFD
authorKenichi Handa <handa@m17n.org>
Mon, 6 Jan 2003 01:12:14 +0000 (01:12 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 6 Jan 2003 01:12:14 +0000 (01:12 +0000)
format, try to get XLFD name by x-list-fonts.

lisp/international/fontset.el

index e0f21f5f6e33c3568389e20d291bfb5f7897c76d..a48d7db5a56116c57262ada35a56b577cdc7c508 100644 (file)
@@ -552,7 +552,9 @@ XLFD-FIELDS."
     (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)))