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: Kenichi Handa
Subject: Re: how to determine whether a char can be displayed or not
Date: Wed, 11 Oct 2000 16:27:14 +0900 (JST)

Eli Zaretskii <address@hidden> writes:
> 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.

I'm not sure what you mean, especially what kind of code you
mean by "tty-related code".

Anyway, on tty, Emacs always encode the text by terminal
coding system (if it is nil, by safe terminal coding system)
before sending the text to tty.  And, in that encoding,
unsafe characters are changed to `?'.  And, terminal coding
system may support multiple safe character sets (e.g
iso-2022-jp supports ascii, japanese-jisx0208,
katakana-jisx0201, japanese-jisx0212).

>>      (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).

Oops, sorry.  My finger is not yet familiar with those new
functions.

---
Ken'ichi HANDA
address@hidden



reply via email to

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