When converting the attached PostScript file into PDF with GS Head, text from the resulting PDF file cannot be copied - i get __ instead of the actual text. It works fine with gs8.72 and older gs9.0 build.
Created attachment 7081 [details] PostScript file
Created attachment 7082 [details] PDF file produced with GS Head
Created attachment 7083 [details] PDF file produced with GSv8.72
Hmm..... it seems the Adobe documentation lies (or more generously is inconsistent). The CMap tech note (5014) says that entries are not zero padded, so values less than 256 are emitted as single bytes, values 256->65535 are two bytes etc. However the ToUnicode CMap tech note (5411) says: "Because a “ToUnicode” mapping file is used to covert from CIDs (which begin at decimal 0, which is expressed as 0x0000 in hexadecimal notation) to Unicode code points, the following “codespacerange” definition, without exception, shall always be used: 1 begincodespacerange <0000> <FFFF>endcodespacerange" (This is somewhat restrictive, since CIDs can exceed 2 bytes, even though UTF-16 can't, I could forsee a need to map high CIDs to lower UTF-16 values) Finally, the PDF Reference (1.7) says: "The CMap file must contain begincodespacerange and endcodespacerangeoperators that are consistent with the encoding that the font uses. In particular, for a simple font, the codespace must be one byte long." So the PDF Reference conflicts with the tech note which it references! In fact none of the above seems to be quite what Acrobat actually does. It seems that Acrobat does not care what size (in bytes) the codespacerange is, no matter what kind of font is present. However it *does* care what size the bfrange entries are. For simple fonts the bfrange entries must be single bytes, for CIDFonts the bfrange entries must be two bytes. Deviation in either case leads to files which Acrobat cannot process and either causes errors or incorrect text when copying and pasting. A fix which writes the codespacerange and bfrange depending on the type of the font is now in testing.
Fixed in revision 11993, patch here: http://ghostscript.com/pipermail/gs-cvs/2011-January/012082.html
*** Bug 692073 has been marked as a duplicate of this bug. ***