[XeTeX] PDFs and advanced font features
khaledhosny at eglug.org
Fri Oct 29 21:44:56 CEST 2010
On Fri, Oct 29, 2010 at 05:29:10PM +0200, Bogdan Butnaru wrote:
> On Fri, Oct 29, 2010 at 16:59, William Adams <will.adams at frycomm.com> wrote:
> > On Oct 28, 2010, at 11:05 AM, Bogdan Butnaru wrote:
> >> On page 4 there are two examples of small caps usage. On my computer,
> >> at least, the first one (Warnock Pro in italic+small caps) cannot be
> >> copied correctly. The second example (in Hoefler Text, bold+small
> >> caps) however does work. I suspect Hoefler Text uses a different font
> >> file for the small caps rather than feature tags in a font with normal
> >> minuscules.
> > No, Hoefler Text is a QuickDraw/GX-derived Apple font and is a single file --- Warnock Pro is also a single file (Adobe OpenType font).
> I don’t really know, I don’t have the font. This:
> suggests they have a font for every “style”, and they seem to count
> small caps as one. No idea exactly how they package it.
> The point is that the encoding of glyphs in the resulting PDF is
> different. If I copy page four and paste it in a simple text editor
> (Geany, in my case) with a font that doesn’t have small caps (the
> default “sans” font for my system, never knew how to find its name),
> the Warnock example appears as gibberish (PUA codepoints, I assume),
> while the Hoefler one is normal text. If I change Geany’s font to
> Adobe Garamond Pro, then the Warnock example is visible, in Garamond’s
> small caps. Basically, they seem to have the same PUA encoding for the
> small caps.
I think if the glyph are assigned PUA code point (which is now not
considered a good practice) you will get the PUA code points when
copying the text, but if the glyphs are unencoded and named according to
Adobe recommendation (e.g. smallcap A is A.sc, fi ligature is f_i and so
on) the PDF viewer will guess the correct code point from the glyph name
when copying text. There is also tounicode something table in PDF file
that I'm not sure if related to this or not.
Arabic localiser and member of Arabeyes.org team
Free font developer
More information about the XeTeX