[XeTeX] Determining current font

Ulrike Fischer news2 at nililand.de
Sun Jun 8 10:41:38 CEST 2008


Am Sat, 7 Jun 2008 20:04:03 -1000 schrieb James Crippen:

> This is a XeLaTeX/fontspec problem, I've got a current SVN checkout of
> XeTeX and fontspec 1.17, both on Mac OS X 10.5.3. I'm trying to write
> a macro which selects a specific nonstandard symbol from two different
> fonts. Specifically, both Charis SIL and Adobe Minion offer a slashed
> zero symbol, but encoded differently for both. In addition, both have
> different OpenType features used to access them (Charis SIL uses a
> variation of the empty set, and Minion uses the SlashedZero feature,
> IIRC).
> 
> My idea was to simply check which font was currently in use when the
> macro is called, and specify one or the other ɡlyph dependinɡ on the
> font. But I've been looking around in the documentation and sources
> for fontspec and XeTeX and I can't find a macro that returns the value
> of the current font which I could use for a conditional.
> 
> Is there a way to get information about the current font in use? A
> macro or variable I can poke at?

The family is stored in \f at family (standard LaTeX} and \zf at family (from
fontspec) (I don't know if there are cases where the commands give
different results).




-- 
Ulrike Fischer 



More information about the XeTeX mailing list