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

Khaled Hosny khaledhosny at eglug.org
Tue Nov 29 07:03:34 CET 2011


On Mon, Nov 28, 2011 at 09:06:12AM +0100, Heiko Oberdiek wrote:
> On Mon, Nov 28, 2011 at 07:19:48AM +0000, Jonathan Kew wrote:
> 
> > On 28 Nov 2011, at 06:59, Heiko Oberdiek wrote:
> > 
> > > On Mon, Nov 28, 2011 at 03:07:07PM +1030, Andrew Moschou wrote:
> > > 
> > >> 2011/11/28 Zdenek Wagner <zdenek.wagner at gmail.com>
> > >> 
> > >>> Put it into an \hbox and measure its width (\wd). If the width is
> > >>> zero, the glyph does not exist.
> > >>> 
> > >> 
> > >> If the required glyph doesn't exist, wouldn't this measure the ".notdef"
> > >> glyph?
> > > 
> > > No,
> > 
> > Yes, it would (and .notdef may of course have non-zero width).
> 
> \catcode`\{=1
> \catcode`\}=2
> \catcode`\^=7
> \showboxdepth=10000
> \showboxbreadth=10000
> \tracingonline=1
> \font\rm=cmr10\relax
> \rm
> \setbox0=\hbox{\kern1pt^^^^018e}
> \showbox0
> \csname @@end\endcsname\end
> 
> And where is the inserted ".notdef" glyph?

.notdef is inserted for "native" fonts, for TFM fonts (as in your
example), the old TeX behaviour of inserting nothing is retained.

Regards,
 Khaled


More information about the XeTeX mailing list