[Top][All Lists]

[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: Kenichi Handa
Subject: Re: how to determine whether a char can be displayed or not
Date: Tue, 17 Oct 2000 10:20:04 +0900 (JST)

Eli Zaretskii <address@hidden> writes:
> What I meant was the code, like on xfaces.c, which manipulates faces on 
> non-windowed displays.  The function you wrote seemed to indicate that 
> such displays support ``a font'' which includes all the character sets 
> that can be safely encoded by the terminal coding system.  I'm not sure 
> the face-related code on xfaces.c and elsewhere is consistent with this.  

> For example, Fframe_parameters and realize_tty_face return a single
> (faked) font name for tty's, no matter what the terminal coding system is
> set to.  Also, the font-related members of struct face are not set in
> realize_tty_face (with the exception of the font name).  Etc., etc. 

> I'm afraid that if a single font-related function will behave as if fonts 
> were really supported on tty's, the inconsistency with other parts of 
> Emacs, which currently ignore fonts on tty's, will lead to bugs.

I think I see what you mean.

But, the fuction char-displayable-p is not merely a
"font-related" function.  If the display of the selected
frame is graphic (i.e. displaying characters by font), it
checks fonts.  But if the display is text-only terminal, it
checks the terminal (i.e. the terminal coding system).

So, the caller should not expect that a font is usable now
even if char-displayable-p returns t.

If the original intention for requesting this kind of
function is to check if a character can be displayed by some
font, the function name should be something like
char-font-available-p, and it should return nil on tty as
you wrote.

Ken'ichi HANDA

reply via email to

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