[XeTeX] Detect, whether a font contains a certain character

Zdenek Wagner zdenek.wagner at gmail.com
Sun Nov 27 23:35:29 CET 2011


2011/11/27 Tobias Schoel <liesdiedatei at googlemail.com>:
> Hi,
>
> I know, this question has been raised several times on this list. But I'm
> bad at searching, so I'm just asking:
>
> How can I detect, whether a font contains a certain character (let's say
> u2103=Degree Celsius symbol) from within XeTeX?
>
Put it into an \hbox and measure its width (\wd). If the width is
zero, the glyph does not exist.

> Application:
> If a font has this glyph, I would like siunitx to use it as the unit symbol
> for \celsius.
> If a font doesn't have this glyph, I would like siunitx to use °C as the
> unit symbol for \celsius.
>
> Thanks
>
> Toscho
> --
> Tobias Schoel
> Europaschule Kairo
> www.europaschulekairo.com
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the XeTeX mailing list