On Sat 26 May 2018 11:50:31 Ralph Corderoy wrote: > Hi Deri, > > > man -Tpdf will produce what you want. The '\-' (minus) is used as the > > output glyph, but any copy/paste (or searching within document) will > > use '-' (hyphen). > > > > This is similar to the treatment of ligatures. If you look at the > > groff pdf output of the "find" man page you will see that "fi" has > > been replaced with a ligature in the output, but if you cut and paste > > the two characters “fi" are returned, and you can search for "find". > > For those of us that don't know PDF, how is this achieved? Is it the > PDF viewer that's translating to try and be helpful, assuming we don't > want the ligature, and thus vary by viewer, or the PDF itself that > states this should happen? What if I do want to paste the ligature in > `groff'?
Hi Ralph, The "-u" flag for gropdf allows you to specify your own CMap which contains the information on glyph mapping. The default if you don't use the flag is:- =========================================================================== /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> <FFFF> endcodespacerange 2 beginbfrange <008b> <008f> [<00660066> <00660069> <0066006c> <006600660069> <00660066006C>] <00ad> <00ad> <002d> endbfrange endcmap CMapName currentdict /CMap defineresource pop end end =========================================================================== The section starting "beginbfrange" specifies the glyph to character mapping. The first two numbers are a start and end pair followed by the mapping you would like to use for each glyph in the range. If you include the flag "-u" on its own the default is not included so you could cut and paste the ligatures if you wanted. Cheers Deri