[XeTeX] detection of absent characters within a font

Jonathan Kew jonathan_kew at sil.org
Thu Nov 11 16:26:28 CET 2004


On 11 Nov 2004, at 9:35 am, Hans Hagen wrote:

> Adam Lindsay wrote:
>> Hi all,
>> As basic ConTeXt/XeTeX support is mostly under control now, I was 
>> looking
>> to enable some "extras".
>> The first was detecting whether or not a character is present in the
>> current font. I tried checking the width of a scratchbox with the
>> character, but it *doesn't* have zero width when the font is missing 
>> that
>> character, in my tests this morning. (No, for this application, I'm 
>> not
>> too fussed about combining diacriticals.)
>> Widths didn't work. Is there any other indicator that a character is
>> missing in action?
>
> take a look at the etex manual, there are \fontchar* and \iffontchar 
> primitives
>

That won't help when using "native" OS X fonts in XeTeX; those (I 
assume) are based on .TFM information.

Adam, the answer is currently "no", but this may change. (In some 
cases, you might get width=0, but that depends on what the font 
designer provides for ".notdef"; in many TrueType fonts, at least, 
unsupported characters map to an "empty box" glyph.)

JK



More information about the XeTeX mailing list