emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to determine whether a char can be displayed or not


From: Eli Zaretskii
Subject: Re: how to determine whether a char can be displayed or not
Date: Wed, 11 Oct 2000 08:52:22 +0200 (IST)

On Wed, 11 Oct 2000, Kenichi Handa wrote:

> Dave Love <address@hidden> writes:
> > "Eli Zaretskii" <address@hidden> writes:
> >>  This should return non-nil for an ASCII font on all systems.  Also,
> >>  calling fontset-font unconditionally will signal an error on systems
> >>  which don't support fontsets (e.g., MS-DOS); 
> 
> > Shouldn't it just return nil, as on ttys?
> 
> On ttys, I think we should check terminal coding system.

If we do that, we need to make sure that all the other tty-related
code handles the appropriate single non-ASCII charset in the same
manner.  Right now, I'm not sure that Emacs will not barf on a tty
when asked to display a non-ASCII font, because as far as Emacs is
concerned, display on a tty does not involve fonts.

>       (window-system
>        ;; 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.

Please don't use window-system unless you really have to.  In this
case, display-multi-font-p is the right predicate, because it will
DTRT for the MS-DOS version (which uses a non-nil window-system).

window-system is the right tool only for features that are specific to
a certain display type, such as X or W32, and then only if those
features are so deeply entrenched in the underlying platform that they
are unlikely to change any time soon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]