[XeTeX] \XeTeXuseglyphmetrics (was Re: Re: [OS X TeX] gtamacfonts ligatures: PDF searchability)
Bruno Voisin
bvoisin at mac.com
Wed May 17 18:36:52 CEST 2006
Le 28 mars 06 à 18:36, Jonathan Kew a écrit :
> In the current development version of XeTeX, which will be released
> as 0.991 when I get enough time to put a new package together,
> there is a parameter \XeTeXuseglyphmetrics you can set that causes
> the engine to use true glyph height and depth metrics in these
> computations, instead of the font-wide ascent and descent. (This is
> an optional setting, as there's a performance hit for using this,
> and for simple running text it is often not needed.)
Having built version 0.991 recently, I was feeling adventurous today
and decided to give the newly added glyph metrics setting a try.
Searching through earlier messages I found the name
\XeTeXuseglyphmetrics in the quoted message, and the syntax
\XeTeXuseglyphmetrics=1 in the attachement xetex-sample2e.tex from a
more recent message "Rép : [XeTeX] Correct LaTeX-logo – how?" from 7
May.
Thus I tried putting \XeTeXuseglyphmetrics=1 in a XeLaTeX document,
before \begin{document}. Without it, here's what I get for example:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 2.png
Type: image/png
Size: 11121 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0006.png
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 8.png
Type: image/png
Size: 22738 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0007.png
-------------- next part --------------
And then with it:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 5.png
Type: image/png
Size: 10015 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0008.png
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 9.png
Type: image/png
Size: 22664 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0009.png
-------------- next part --------------
In the first case, the parentheses (entered through \left( and
\right)) are given a more appropriate size; in the second case, the
extra interline spacing added by the presence of a superscript is
made very very slightly smaller, but not much. The fonts are a
mixture of Hoefler Text for text and Lucida for maths.
By contrast here's what I'm getting with Lucida only in pdfLaTeX:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 7.png
Type: image/png
Size: 9852 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0010.png
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 10.png
Type: image/png
Size: 22341 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060517/8ee769a9/attachment-0011.png
-------------- next part --------------
In this case, the superscript does not create any extra interline
space, and that's what I was hoping to reproduce in XeLaTeX.
Hence the question: what's the exact syntax of \XeTeXuseglyphmetrics?
Is it boolean, with only two values 0 for false and 1 for true? Or is
it like pdfTeX's \protcode, having several values 0, 1 and 2
corresponding to the "intensity" with which the correction is applied?
I did not notice any significant performance hit when using
\XeTeXuseglyphmetrics, by the way.
Bruno Voisin
More information about the XeTeX
mailing list