changeset 54638:4860d5ef0587

(char-displayable-p): Fix generation of XLFD file name.
author Kenichi Handa <handa@m17n.org>
date Mon, 29 Mar 2004 03:41:39 +0000
parents df2f0fcc5fa2
children aa979e2a3cb4
files lisp/international/mule-util.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-util.el	Mon Mar 29 02:58:56 2004 +0000
+++ b/lisp/international/mule-util.el	Mon Mar 29 03:41:39 2004 +0000
@@ -384,10 +384,15 @@
 		 ;; 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)))