[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] hyphen, minus sign and hyphen-minus

From: Pali Rohár
Subject: Re: [groff] hyphen, minus sign and hyphen-minus
Date: Sat, 26 May 2018 13:13:18 +0200
User-agent: NeoMutt/20170113 (1.7.2)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]