On 25/8/16 18:02, Philip Taylor wrote:
For some time now I have been partially aware of some oddities in the XeTeX implementation of :letterspace, but it was only today that my thoughts crystallised sufficiently for me to attempt to record them on- list :1) Search functionality. For : \font \errorfont = "Copperplate Gothic Bold:letterspace=8,color=BF0000" scaled 2260 \newbox \errorbox \setbox \errorbox = \leftline {\errorfont +++ NOT AT TOP OF PAGE +++} Adobe Acrobat 7.1 has no problem locating the string "+++" if the contents of \errorbox end up in the PDF file; however, for \font \errorfont = "Copperplate Gothic Bold:letterspace=16,color=BF0000" scaled 2260 the same string cannot be found.
Remember that TeX doesn't treat spaces as "characters" but as glue, which means they don't end up as part of the *text* in the resulting DVI or PDF file; they are merely implied by the positioning of the visible glyphs.
As a result, consider what Acrobat must be doing: it can "see" the visible glyphs and their positions, but it "sees" no <space> characters separating words. It must be inferring which characters are adjacent in the text stream, and which are separated by spaces, purely from their positions. So when you add a substantial amount of letter-spacing, it seems likely that Acrobat will view the text as being "+ + +" rather than "+++".
It's possible that \XeTeXgenerateactualtext=1 would help, as I think it would annotate the letter-spaced "+++" as a unit with its actual text, allowing Acrobat to find it correctly despite the intervening spaces that *appear* to be present from just looking at the glyphs.
JK -------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
