[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I check for the existence of a glyph in TeX?
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:
>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
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
check afterwards :-)?