From: Kenichi Handa Date: Mon, 29 Mar 2004 03:41:39 +0000 (+0000) Subject: (char-displayable-p): Fix generation of XLFD file name. X-Git-Tag: ttn-vms-21-2-B4~7034 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fdc5802e53c1a70ed5acc45f593089102d3e6385;p=emacs.git (char-displayable-p): Fix generation of XLFD file name. --- 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)))