diff options
| author | Kenichi Handa | 2004-04-23 02:08:22 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-04-23 02:08:22 +0000 |
| commit | 44416f23ab21dfbc8adb741875c47fd3f657a562 (patch) | |
| tree | 3af9309979b317abac983186cd2c20d536d109e3 | |
| parent | cf14fd6ec4f2a953eb796c9d42917a01a0c97973 (diff) | |
| download | emacs-44416f23ab21dfbc8adb741875c47fd3f657a562.tar.gz emacs-44416f23ab21dfbc8adb741875c47fd3f657a562.zip | |
(char-displayable-p): Simplified by using internal-char-font.
| -rw-r--r-- | lisp/international/mule-util.el | 22 |
1 files changed, 1 insertions, 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." | |||
| 373 | ;; On a window system, a character is displayable if we have | 373 | ;; On a window system, a character is displayable if we have |
| 374 | ;; a font for that character in the default face of the | 374 | ;; a font for that character in the default face of the |
| 375 | ;; currently selected frame. | 375 | ;; currently selected frame. |
| 376 | (let ((fontset (frame-parameter (selected-frame) 'font)) | 376 | (car (internal-char-font nil char))) |
| 377 | font-pattern) | ||
| 378 | (if (query-fontset fontset) | ||
| 379 | (setq font-pattern (fontset-font fontset char))) | ||
| 380 | (or font-pattern | ||
| 381 | (setq font-pattern (fontset-font "fontset-default" char))) | ||
| 382 | (if font-pattern | ||
| 383 | (progn | ||
| 384 | ;; Now FONT-PATTERN is a string or a cons of family | ||
| 385 | ;; field pattern and registry field pattern. | ||
| 386 | (or (stringp font-pattern) | ||
| 387 | (let ((family (or (car font-pattern) "*")) | ||
| 388 | (registry (or (cdr font-pattern) "*"))) | ||
| 389 | (or (string-match "-" family) | ||
| 390 | (setq family (concat "*-" family))) | ||
| 391 | (or (string-match "-" registry) | ||
| 392 | (setq registry (concat registry "-*"))) | ||
| 393 | (setq font-pattern | ||
| 394 | (format "-%s-*-*-*-*-*-*-*-*-*-*-%s" | ||
| 395 | family registry)))) | ||
| 396 | (x-list-fonts font-pattern 'default (selected-frame) 1))))) | ||
| 397 | (t | 377 | (t |
| 398 | (let ((coding (terminal-coding-system))) | 378 | (let ((coding (terminal-coding-system))) |
| 399 | (if coding | 379 | (if coding |