From fdc5802e53c1a70ed5acc45f593089102d3e6385 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 Mar 2004 03:41:39 +0000 Subject: [PATCH] (char-displayable-p): Fix generation of XLFD file name. --- lisp/international/mule-util.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index b667ec9227a..3a3539359ec 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -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))) -- 2.39.5