]> git.eshelyaron.com Git - emacs.git/commitdiff
(char-displayable-p): Fix generation of XLFD file name.
authorKenichi Handa <handa@m17n.org>
Mon, 29 Mar 2004 03:41:39 +0000 (03:41 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 29 Mar 2004 03:41:39 +0000 (03:41 +0000)
lisp/international/mule-util.el

index b667ec9227afd21825b3e7040beb786952e71506..3a3539359ec3726ac9a60032db557d3355ef834a 100644 (file)
@@ -384,10 +384,15 @@ basis, this may not be accurate."
                 ;; Now FONT-PATTERN is a string or a cons of family
                 ;; field pattern and registry field pattern.
                 (or (stringp font-pattern)
-                    (setq font-pattern (concat "-"
-                                               (or (car font-pattern) "*")
-                                               "-*-"
-                                               (cdr font-pattern))))
+                    (let ((family (or (car font-pattern) "*"))
+                          (registry (or (cdr font-pattern) "*")))
+                      (or (string-match "-" family)
+                          (setq family (concat "*-" family)))
+                      (or (string-match "-" registry)
+                          (setq registry (concat registry "-*")))
+                      (setq font-pattern
+                            (format "-%s-*-*-*-*-*-*-*-*-*-*-%s"
+                                    family registry))))
                 (x-list-fonts font-pattern 'default (selected-frame) 1)))))
        (t
         (let ((coding (terminal-coding-system)))