2

Process the following with pdftex. Character - is not searchable:

\font\f=cmtex10 \f
-
\bye

Compare with cmtt10 font:

\tt
-
\bye

Is this a feature or a bug?

Will the following code in format file be a proper fix for this problem?

% \input glyphtounicode
\pdfgentounicode=1
\everyjob=\expandafter{\the\everyjob
  \pdfglyphtounicode{minus}{002D}}

Is in necessary to use "\input glyphtounicode"?

EDIT

According to info on this page, cmtex must have the same parameters as cmtt:

The extended ASCII font, cmtex10, has the parameters of cmtt10 ...

How should I proceed to get it fixed in cmtex fonts in TeX Live?

Igor Liferenko
  • 7,063
  • 2
  • 14
  • 47
  • Can you add some more information: What implementation of the cm fonts are you using? – Sir Cornflakes Mar 22 '16 at 08:36
  • The adobe reader has no problems, but sumatra can't find the glyph (which is called "minus" instead of "hyphen" in the pfb). The side effect of the glyph to unicode is that now a real math minus is found too. – Ulrike Fischer Mar 22 '16 at 08:57
  • @jknappen: I use TeX Live 2015. I'm curious what implementation of cm fonts it contains... – Igor Liferenko Mar 22 '16 at 09:46
  • @UlrikeFischer: sorry, it is not clear to me with what "adobe reader has no prablems" Do we need to use "\input glyphtounicode" with "\pdfgentounicode=1"? cmtt and cmtex must have the same CMap codes, because their glyphs are the same, don't they? Is the fact that real minus is found too the only problem with my fix? – Igor Liferenko Mar 22 '16 at 09:50
  • 1
    The glyph names are different. Look in the pfb and you will see in cmtex10.pfb dup 45 /minus put (which is imho wrong) and in cmtt10.pfb dup 45 /hyphen put. pdf viewer handles such naming inconsistencies differently. I wouldn't call it a problem that the real minus is affected (it even makes copy and paste of math better), but you should be aware of it. – Ulrike Fischer Mar 22 '16 at 10:09
  • 1
    To the EDIT: The parameters mentioned in the quote are the design parameters of METAFONT (e.g., the basic units for horizontal and vertical extend of the glyphs, stroke thicknesses, shape parameters for bowls, serif parameters, etc.). The error has nothing to do with them, it is an artefact from the latter conversion to PostScript. – Sir Cornflakes Mar 22 '16 at 13:04

1 Answers1

1

This is too long for a comment, but not an answer:

I was able to reproduce the problem with the following input file

\font\f=cmtex10 \f
cmtex10: -

\tt cmtt10: -
\bye

And the following terminal output:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
restricted \write18 enabled.
entering extended mode
(./test.tex [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] )</usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on test.pdf (1 page, 26129 bytes).
Transcript written on test.log.

and checking the automatic search with evince. Only the cmtt10 hyphen is found by the search function.