[XeTeX] \XeTeXuseglyphmetrics (was Re: Re: [OS X TeX] gtamacfonts ligatures: PDF searchability)

Jonathan Kew jonathan_kew at sil.org
Thu May 18 11:27:42 CEST 2006


On 18 May 2006, at 10:01 am, Bruno Voisin wrote:

> Le 18 mai 06 à 09:59, Bruno Voisin a écrit :
>
>> I'm still missing the tightier and more regular spacing from the  
>> third case, which seems essentially caused by the different  
>> placement of the superscript "1/2" (a bit further on the right,  
>> and further down, in pdfLaTeX). I've not managed to understand how  
>> the metrics were created for the Hoefler Text font in the  
>> gtamacfonts collection of packages; hence I've no idea on what  
>> could be done in XeTeX about this, if anything can indeed be done.
>
> Looking more closely, I'm having the impression this might be a  
> XeTeX feature: XeTeX calculating the glyph metrics for the standard  
> font size, and using it afterwards for all sizes without scaling it  
> fully;

If that's happening, it would be a bug....

> or applying \lineskiplimit differently depending on the size;

....and so would that (but remember that LaTeX may not be scaling  
\lineskiplimit and \lineskip when the font size changes, in which  
case the effect in proportion to the type size would vary).

> or the way font sizes and associated placement parameters are  
> defined in LaTeX playing bad with XeTeX font model.
>
> What has me thinking this: the earlier example was from a figure  
> caption, typeset in \footnotesize; and looking more closely, I'm  
> not seeing exactly the same effect in the body of the paper, in  
> \normalsize. Namely, descenders on one line followed by  
> superscripts on the next line add some interline spacing in  
> \footnotesize:
>
> <Image 11.png>
>
>
> but not in \normalsize:
>
> <Image 12.png>

It's not entirely surprising that you'd see different effects, as the  
ratio of font size to \baselineskip (and \lineskiplimit, and  
\lineskip) is probably not the same in the different environments. In  
particular, the use of \lineskiplimit=0pt and \lineskip=1pt, which I  
think are the LaTeX defaults, means that you get a jarring  
discontinuity at the point where TeX switches from setting lines on  
\baselineskip to putting \lineskip between them. And the differing  
font-size/line-spacing ratios could mean that in one case, you just  
cross over this boundary, while in the other, you don't.

> In \normalsize I'm even seeing XeTeX accepting practically zero  
> vertical space between a descender and a superscript:
>
> <Image 10.png>

I'm a bit surprised to see the really tight line-spacing here, but to  
know whether it's correct or not, we'd need to see the values of the  
various line-spacing parameters at this point.

Unfortunately, I don't have the Lucida fonts (Y&Y ones?) that you're  
using, and so I can't easily reproduce your exact examples to  
investigate further. (Nor do I really understand how to control math- 
mode fonts, I have to admit.)

If you have time to put together some small test cases that I could  
run (e.g., using euler rather than lucidabr, or even mixing Hoefler  
and CM -- for test purposes, it doesn't really matter if they don't  
harmonize nicely!), I'd be happy to poke around and see whether there  
are underlying issues in XeTeX that can be improved.

JK



More information about the XeTeX mailing list