I'm sending PDFs to some folks who are supposed to copy some of the content elsewhere. It is important that my files are searchable and copyable (while I doubt these words to be proper English...)

So I'm using the package cmap. Recently I have been told, that cmap comes with a limitation, and indeed the manual says: »The main limitation currently is inability to work with virtual fonts, and this is because of limitation of pdftex, and may be resolved in a future versions of pdftex.«

In a question about ligatures and the libertine font here the advice was to use

\input glyphtounicode

instead of the package cmap.

The pdftex manual on p. 29 explaines:

The glyphtounicode.tex file (distributed with pdfTEX and other software) contains thousands of such definitions, covering most common glyph names. ... LaTeX users could load the cmap package to achieve the same effect.

I can't find any hint to the limitation, which is mentioned by the cmap manual. So my question is:

Does \input glyphtounicode \pdfgentounicode=1work with virtual fonts? Has the limitation mentioned in the cmap manual been resolved?

  • 2
    The \input glyphtounicode \pdfgentounicode=1 method is newer. It made its way into pdflatex end of 2006. It works with virtual fonts but imho it does not work with pk-fonts, only with type1 fonts (no idea about ttf). Sep 17, 2018 at 15:28
  • @UlrikeFischer So the cited sentence in the pdftex-a manual about LaTeX users may use cmap is wrong?
    – Keks Dose
    Sep 17, 2018 at 15:38
  • 1
    Yes, imho it is at least quite misleading. The libertine example shows cleary that the two methods do not do the same. Sep 17, 2018 at 15:41
  • 3
    @UlrikeFischer Do you want to write up an answer?
    – TeXnician
    Oct 6, 2018 at 15:24
  • 4
    @UlrikeFischer Could you please help to expand your comment into an answer? Any detail on glyphtounicode shall be much valuable. Sep 2, 2019 at 14:26


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.