(char-displayable-p): Fix generation of XLFD file name.

This commit is contained in:
Kenichi Handa 2004-03-29 03:41:39 +00:00
parent f8b0995724
commit fdc5802e53

View 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)))