[NTG-pdftex] Error with \pdfglyphtounicode when surrogates areinvolved.

Ross Moore ross.moore at mq.edu.au
Tue May 30 22:30:44 CEST 2017

Hi Akira,

On 30/05/2017, at 19:39, "Akira Kakuto" <kakuto at fuk.kindai.ac.jp> wrote:

>> Here is a minimal working example that shows the issue.
> In the original test.tex, I encountered an assertion error
> in tounicode.c. If I change as
> \pdfcompresslevel=0
> \pdfgentounicode=1
> \input glyphtounicode.tex
> \pdfglyphtounicode{Z}{1D481}   % MATH bold-italic-Z U+1D481 (U+D835 U+DC81)

Yes, I discovered that this works, shortly after posting.
But it doesn't explain why what should be valid input is changed to something invalid.
And what should happen with longer strings?

For example this works fine:

\pdfglyphtounicode{t_t}{00770077}  % break ligature into separate letters

as does adding multiple combining accents (e.g.  0300 etc.) after the Hex for other characters.
But what if it was required to map into multiple higher-plane glyphs?

Is the only documentation on this by reading the source file?    tounicode.c  

> Z $Z$
> \bye
> I obtained an attached test.pdf, in which I can find two strings
> <5A> <D835DC81>.
> Best,
> Akira
> <test.pdf>



More information about the ntg-pdftex mailing list