]> git.eshelyaron.com Git - emacs.git/commitdiff
(char-displayable-p): Simplified by using internal-char-font.
authorKenichi Handa <handa@m17n.org>
Fri, 23 Apr 2004 02:08:22 +0000 (02:08 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 23 Apr 2004 02:08:22 +0000 (02:08 +0000)
lisp/international/mule-util.el

index 3a3539359ec3726ac9a60032db557d3355ef834a..1d1fe5391164d8cdd8e05c1caf7c7e99dfbb093f 100644 (file)
@@ -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