[XeTeX] fontspec, fractions, and parens
Jonathan Kew
jonathan_kew at sil.org
Mon Nov 19 21:02:42 CET 2007
On 19 Nov 2007, at 7:30 pm, Ross Moore wrote:
> Hi Will,
>
> On 19/11/2007, at 9:55 AM, Will Robertson wrote:
>
>> Yep. There's also the Numerator and Denominator VerticalPosition
>> features. Then you'd glue them together with a fraction slash glyph.
>> See xltxtra's \vfrac for a macro that will create arbitrary "vulgar"
>> fractions if the font supports it...
>
> OK. I wasn't aware that this was possible. Very neat!
>
> Looking at coding in xltxtra.sty , what is the purpose of
> lines like the following? (3 instances, connected with
> super/subscripts and fractions)
>
> \c at zf@script 1818326126\relax
>
> It looks like these are setting a particular value for a counter,
> but where is this counter ever used?
In hex, that would be 6C61746E, which makes it a little easier to
recognize; interpreted as four ASCII bytes, that represents 'latn'.
That's the value of the OpenType script tag for Latin script.
Features in OT fonts are organized under scripts (usually only one
per font, but not necessarily... see Code2000 for an extreme case of
multi-script features). So if xltxtra wants to examine the font for
certain features, it'll need to specify which script system it's
interested in. This counter must be something fontspec is using
internally in examining font features; xltxtra is taking advantage of
"internal" macros from fontspec to help it deal with fonts.
I guess the main "public" fontspec interface didn't provide the exact
details xltxtra wanted, so Will has gone to another level to find
them. Maybe not the cleanest possible separation, but entirely
reasonable in the (La)TeX world, I think.
I suppose this means that the xltxtra \vfrac macro might not work
with a non-Latin OT font, even if it had the appropriate features
(under its non-'latn' script tag). Probably not a big concern at this
point, though.
JK
More information about the XeTeX
mailing list