I would like to use Adobe Times Roman font or its equivalent (like URW Nimbus Roman and fonts based on it), compiling with pdflatex to PDF -- the original intent was to have PDF smaller by using built-in fonts. The document in question is in Polish, and uses UTF-8 input encoding. I would like the PDF to be copy-and-pasteable with result in UTF-8, for both roman family and typewriter family (for code listing).
Unfortunately neither of solutions in What are good ways to make pdflatex output copy-and-pasteable? works, at least not with \usepackage{times} as a way to switch to Roman-like font.
Take an example document:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
%\usepackage{lmodern}
\input glyphtounicode
\pdfgentounicode=1
%\usepackage{cmap}
\begin{document}
\noindent
\rmfamily
rmfamily: zażółć gęsią jaźń \\
\ttfamily
ttfamily: zażółć gęsią jaźń \\
\end{document}
The result is not an unrecognizable mess of symbols as was in Can't copy-paste from my PDF. Any idea why?, but some of Polish characters are copied in a strange way, as if precomposed: with base character and accent (decoration) separate... and either of them can be out of text flow.
For the example document the pdftotext result (and copy'n'paste result) is:
˙ c e ˛ z´ rmfamily: zazół´ g˛ sia ja´ n ttfamily: za˙ół´ g˛sia ja´´ z c e ˛ zn 1
If I switch from times to lmodern (Latin Modern font), and presumably also when switching to cm-super I get the correct result:
rmfamily: zażółć gęsią jaźń ttfamily: zażółć gęsią jaźń 1

glyphtounicode. AFAIK it's a file and thus it should be{glyphtounicode}. – henry Apr 17 '15 at 18:40\input{glyphtounicode}, my code below won't work anymore. The copy-and-past will be gobbled. – Sverre Apr 17 '15 at 18:55glyphtounicode.texon my OS and it is definitely a file... at least in the way I use it. – henry Apr 18 '15 at 08:27