# MinionPro and Searchability/Encoding

I'm using pdflatex with the MinionPro package. The PDF looks fine, but apparently some characters (specifically "W" and the "Th" ligature) are put in the PDF in a way that breaks searchability. For example, if a document contains the text "A Wedge", then searching for "A Wedge" will not yield a hit. If I copy and paste this string into a text file, the result is "AWedge". With "Th" it's similar: "A Thing" becomes "AThing" when copied into a text file.

As mentioned in the MinonPro manual, I'm using

\input glyphtounicode
\pdfgentounicode=1


but this doesn't solve the problem. Here's an example:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{MinionPro}
\input glyphtounicode
\pdfgentounicode=1
\begin{document}
A Wedge A Thing
\end{document}


Any ideas?

• That's not a ligature problem: you pdf reader doesn't recognize the spaces as they are rather small. You will have to enlarge the interword spacing. – Ulrike Fischer Apr 2 '14 at 19:52
• Thanks! In my case, I think it would be sufficient to increase the interword spacing before "W" and "Th". Apparently with microtype and \SetExtraSpacing it's possible to define the interword spacing after a given character, but what I need is to change the spacing before a given character. Is this possible? – Ubik Apr 2 '14 at 20:22

I found a solution to my problem, and Ulrike's comment was the key for that (thanks again!) As she pointed out, the spaces before "W" and "Th" were too small for the Adobe Reader to be detected as spaces. Ulrike suggested to increase the interword spacing.

However instead of increasing the interword spacing in general, it struck me as a better solution to only change the spaces where it is actually needed (i.e., before "W" and "Th"), and I came up with the following:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{MinionPro}
\usepackage[kerning=true]{microtype}

\SetExtraKerning[context=extended,unit=space]
{encoding={*}, family={MinionPro-OsF}, series={*}, size={normalsize}}
{W={70,},
T={180,}}

\input{glyphtounicode}
\pdfgentounicode=1

\begin{document}
Original kerning:

A Wedge A Thing

\begin{microtypecontext}{kerning=extended}
A Wedge A Thing
\end{microtypecontext}

\end{document}


When I copy the text of the resulting PDF document and paste it in a text file, the result is as follows:

Original kerning:
AWedge AThing

• Version 2.068;PS 2.000;hotconv 1.0.57;makeotf.lib2.0.21895 Oh, and, yes, these are from Reader. – cfr Apr 16 '14 at 22:05