# Re: How can I check for the existence of a glyph in TeX?

```At 1:10 pm +0100 8/9/98, Berthold Horn wrote:
>At 11:52 AM 9/7/98 +0100, Rebecca and Rowland wrote:
>
>>I'm writing a package to automate the use of Euro symbols (the idea is that
>>you type \euro and get a Euro symbol no matter which fount you're using or
>>whether or not it's actually got a Euro).
>
>>One thing I'd like to do is try and ensure that if the fount really *does*
>>have a Euro, you get to use it.  To do this, I need to be able to test for
>>the existence of a real Euro glyph in a fount.
>
>>The immediately obvious test:
>
>>\settowidth{\@tempdima}{\texteuro}
>
>>\ifdim\@tempdima=0pt...
>
>>fails because \texteuro might well have been defined to be a `Missing
>>glyph' rule and therefore have non-zero width (and height and depth).
>
>>So...  Is there any way of seeing if a glyph *really* exists *from TeX*?
>
>This is a tough one, since Knuth worked with fonts that had no missing glyphs.
>Hence there is little support for this sort of thing.  For example, missing
>glyph
>messages do not appear on screen in most TeX implementations, only in the
>log file (which means they are mostly never seen), and then do not contain
>any context information (so it can be very hard to find out where they
>com from).  In any case just testing the character causes an error message
>to be emitted if it is not there. I suppose you could read in the log file
>and
>check afterwards :-)?

An idea...  The problem is that as far as the tfm file is concerned, the
slot is not empty in general when it `points to' a missing glyph: you get a
missing glyph rule in the dvi file and a warning there, not in the log
file.  I think the job's impossible.

Rowland.

```