On Saturday 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! I do not know how is gropdf implemented... But in PDF format you can specify for each glyph in particular font sequence of Unicode code points. And this sequence is used when user select or copy glyph. So you can for one glyph "ff" specify sequence (U+0066, U+0066) and then when user select that glyph, just see ff. In PDF file this mapping is done by Adobe CMap tables (it is embedded in PDF file). I guess that gropdf uses this PDF technique and generate such PDF files. (Or this is how I would implement such feature). -- Pali Rohár pali.ro...@gmail.com