emacs-devel
[Top][All Lists]
Advanced

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

Re: Where is a character presence tested in a font?


From: Jason Rumney
Subject: Re: Where is a character presence tested in a font?
Date: Mon, 16 Jul 2012 10:46:56 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Óscar Fuentes <address@hidden>
>> Date: Sun, 15 Jul 2012 17:44:36 +0200
>> 
>> Could someone point me to the source code (or API name) where Emacs
>> on MS Windows tests for the presence of a given character on a font?
>
> Search for uses of font_has_char.  The Windows implementation of this
> just returns -1, but the code that calls it should then use some
> alternative strategy (which includes opening the font, AFAIU) to
> arrive at the conclusion.

The alternative strategy is to call encode_char. I notice that while the
uniscribe backend's implementation of encode_char does lookup the code
point for the font, the w32 backend just returns the unicode code point
as long as it is not completely outside the range covered by the font.

As Emacs has since been modified to report the backend and codepoint,
perhaps C-u C-x = now will tell whether the original diagnosis was
correct, or for that character we are falling back on the w32 font
backend.



reply via email to

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