[XeTeX] Anomalies in using feature-enabled OT fonts

Takayuki YATO (ZR) zrbabbler at yahoo.co.jp
Sat Nov 20 16:35:35 CET 2010

Thank you for reeponse.

> > 2. \fontcharwd / \fontcharht / \fontchardp
> > \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}
> > \tgpSmcp\measure{a}\measure{f}\measure{g}
> > \bye
> But `a will always resolve too 97, so in all cases you are asking for
> the metrics of the glyph at 97 slot of the font; the meaning of `a is
> font independent (will, I don't know the exact terms, some TeX guru
> would explain better).

I understand your explanation and admit it's logical. But from the
grammar of XeTeX I have the impression that XeTeX treats a font with
some feature enabled as different from the original font; that is,
there are two distinct fonts \tgpNorm and \tgpSmcp, and the latter has
small-caps glyphs for lowercase characters. In this view, the glyph at
slot 97 is different between these "two" fonts. And it is quite natural
that one expect \fontcharwd, \XeTeXcharglyph, etc. applied to \tgpSmcp
return the information on the small-caps glyphs.

> IMO the only reliable way to check for a specific un-encoded glyph is
> either by glyph id or glyph name, but both are very unportable.

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?)

Best regards,

Tak Yato (Takayuki YATO; aka. ZR)

Yahoo! Toolbar  -  For your Internet Safety

More information about the XeTeX mailing list