# [pdftex] Re: "Grouping" glyphs

Geoffrey Alan Washburn geoffw at cis.upenn.edu
Sat Mar 18 19:22:02 CET 2006

Heiko Oberdiek wrote:
> On Thu, Mar 16, 2006 at 11:41:59AM -0500, Geoffrey Alan Washburn wrote:
>
>> Hi everyone.  Consider the following contrived example where I am
>> creating a "new" mathematical symbol out of other glyphs.
>>
>> \documentclass{article}
>> \newcommand{\mysym}{\ensuremath{|\!\!=}}
>> \begin{document}
>> $\mysym$
>> \end{document}
>>
>> This works just fine visually, but it has the problem that \mysym is not
>> treated "atomically".  If I open the resulting PDF in Acrobat Reader and
>> search for "=" it will find the = that is part of my new "glyph".
>> Semantically it shouldn't be consider any "=" anymore, it is part of
>> some new "glyph".
>>
>> Is there some pdfTeX magic that I can use to make \mysym appear to be
>> "atomic" to PDF searching?
>
> In principle it is easy, use a real font that contains |= as glyph.
> The difficulty is to find such a font.
> Virtual TeX fonts will not work, because the resolution would
> put two glyphs "|" and "=" into the pdf output. But in theory
> a Type 3 font could be used that maps the two glyphs as one
> glyph in the Type 3 font together. Also a mapping to Unicode
> can be given, thus that the PDF Reader is able to detect the
> new glyph by its Unicode. But I don't know, whether this approach
> is possible with pdfTeX and how easy this would be.

So it sounds like for the time being, constructing specialized glyphs
is perhaps best done by creating them in METAFONT, FontForge, etc.

Though I am still a little confused as to how it is decided what a
glyph happens to be.  Is it controlled by the information in the
embedded font, or by the output pdfTeX produces?  That is if I have a
font where I have some other glyph in the slot that would normally be
used for the character "A" will a PDF viewer interpret uses of that
glyph to be an "A" or is the specification of whether it is an "A" part
of the PDF document.  I expect by spending some time poring over the PDF
reference guide I'd be able to figure it out.  I suppose the right thing
to do is to when designing a font to put non-standard glyphs into
whatever the "user" reserved Unicode range happens to be.



More information about the pdftex mailing list