[XeTeX] Anomalies in using feature-enabled OT fonts

Takayuki YATO (ZR) zrbabbler at yahoo.co.jp
Sun Nov 21 12:23:30 CET 2010


> So I changed your macro and text body a bit, which now gives quite  
> reasonable values:
> 	\def\measure#1{%
> 	 #1 % print the character
> 	 \setbox0=\hbox{#1}
> 	 \immediate\write16{% output to terminal
> 	   <#1>:
> 	   wd=\the\wd0\space\space/
> 	   ht=\the\ht0\space\space/
> 	   dp=\the\dp0}}
> 	\font\tgpNorm="TeX Gyre Pagella"       % default
> 	\font\tgpSmcp="TeX Gyre Pagella:+smcp" % small-caps
> 	% There two lines should not report the same measurement....
> 	\tgpNorm\measure{a}\measure{f}\measure{g}\measure{A}\measure{F} 
> \measure{G}
> 	\tgpSmcp\measure{a}\measure{f}\measure{g}\measure{A}\measure{F} 
> \measure{G}
Yes it works, and that's what I actually use when \fontcharwd cannot
be used. In the old 8-bit TeX, the following two codes
print the same value (unless boundary kerning and ligature are concerned).
So I anticipate XeTeX goes the same way as far as possible.

>But I think it would be nice to have easy means to determine the  
>printed glyph's dimensions.
[my previous post]
> If I have ever to go in your view, then the variant of \XeTeXcharglyph
> which returns the id of the glyoh that results from feature application
> seems to me the more desirable. And it would be better if there were
> in addition \XeTeXglyphwd, \XeTeXglyphht and \XeTeXglyphdp. (Are the
> latter two equivalent to \XeTeXglyphbounds 2 and \XeTeXglyphbounds 4?)

In fact, I now think that what is really wanting is \XeTeXcharglyph-
variant described in the above quote. Then one can say
to get the right width. Again \XeTeXglyphwd can be simulated by \setbox
and \XeTeXglyph, but this commend will be desired when making macros
that require full expandability.

Best regards,

Tak Yato (Takayuki YATO; aka. ZR)

Yahoo! Toolbar  -  For your Internet Safety

More information about the XeTeX mailing list