[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 7:47 pm +0100 10/9/98, Berthold K.P. Horn wrote:
>At 11:31 AM 98/09/10 -0500, Alan Jeffrey wrote:
>>> Argh!  My TeX tells me right away about missing glyphs (on screen and in
>>> the log file) and gives me the context so I can tell where the problem is!
>>This works because you use a TeX implementation where there's only one
>>notion of `does the glyph exist'.
>>On some systems (notably MacOs) whether a glyph exists or not depends on
>>which driver you use (eg PostScript drivers have access to all glyphs,
>>but QuickDraw drivers don't).  So the notion of `missing glyph' has to
>>be put off to the driver in some cases.
>I find this unacceptable.  A font is a font.

Phooey.  A fount is a tfm file and a pk file and an mf file and a vf file
and a PS Type 1 file and a PS Type 3 file and a TrueType file and an afm
file and a set of lumps of metal and...

See?  Only in one case can you be sure that a `fount is a fount' and that's
when you're dealing with lumps of type metal.  In the case of TeX, all that
TeX *can* see is the tfm file.  If you want to prevent people from using
all the glyphs in a PS fount and being unable to have decent hyphenation,
you can object to the use of vf files.  But since most people are not happy
with limitations like that, they're going to use vf files.  Once you start
using vf files, you lose any chance of TeX having any idea what's `really'
going on.  This is a great help for people using languages that have lots
of accents and things, because this allows TeX to hyphenate properly even
when the fount doesn't `really' have a full set of accented characters.

And one price of this great improvement is that things like missing glyphs
can only be detected at the dvi driver stage.

> I can't have TeX not knowing
>is going on.

It's inherent in the design of TeX: TeX *CAN'T* know about glyphs; all it
can know about is boxes in tfm files.

>  The inability of some drivers to get at the glyphs is a bug
>that should be fixed,

Not exactly: it's recognising that some jobs are difficult to do in some
OSs.  If you would care to spend the huge amount of time needed to allow
(say) OzTeX to do `proper' re-encoding to allow it to access all glyphs in
a fount when printing to a QuickDraw printer, then I'm sure Andrew
Treverrow would love to hear from you.  In the meantime, it's probably best
to stop whinging about other people's coding: they might actually have done
the best job they can.

(I mean, yes, say you don't like it; don't presume to know what other
people `should' do)