From 44416f23ab21dfbc8adb741875c47fd3f657a562 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 23 Apr 2004 02:08:22 +0000 Subject: [PATCH] (char-displayable-p): Simplified by using internal-char-font. --- lisp/international/mule-util.el | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 3a3539359ec..1d1fe539116 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -373,27 +373,7 @@ basis, this may not be accurate." ;; On a window system, a character is displayable if we have ;; a font for that character in the default face of the ;; currently selected frame. - (let ((fontset (frame-parameter (selected-frame) 'font)) - font-pattern) - (if (query-fontset fontset) - (setq font-pattern (fontset-font fontset char))) - (or font-pattern - (setq font-pattern (fontset-font "fontset-default" char))) - (if font-pattern - (progn - ;; Now FONT-PATTERN is a string or a cons of family - ;; field pattern and registry field pattern. - (or (stringp 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))))) + (car (internal-char-font nil char))) (t (let ((coding (terminal-coding-system))) (if coding -- 2.39.5