[XeTeX] XeTeX 0.99 released

Jonathan Kew jonathan_kew at sil.org
Wed Dec 7 14:02:57 CET 2005


On 7 Dec 2005, at 12:08 pm, Adam Lindsay wrote:

> Jonathan Kew wrote:
>> It's close, I think, though I am still thinking about a couple of   
>> items.... First, an extended font-loading command that might be   
>> something like:
>>    \XeTeXfont\cs = "font-name" style "B/S=10" using ICU features   
>> "+smcp,+onum" at 12pt
>>    \XeTeXfont\cs = "font-name" style "BI" using ATSUI features   
>> "Ligatures=Rare Ligatures" at 12pt
>
> Interesting stuff. May I think/question aloud about the design?

Indeed you may. :)

> When queried, which form would XeTeX return as the font name? The  
> compact (current) form? Verbose form? Form that was entered by the  
> user?

I've wondered about that too. I think it would be desirable that

   \font\x = "Hoefler Text/I:Ligatures=Rare Ligatures"
   \show\x

and

   \XeTeXfont\y = "Hoefler Text" style "I" using ATSUI features  
"Ligatures=Rare Ligatures"
   \show\y

should show identical results, just as loading either "Hoefler Text/ 
I" and "Hoefler Text Italic" already do, as they're merely different  
ways of asking for the exact same thing.

(Compare "\font\x=cmr10 scaled \magstep1" and "\font\y=cmr10 at  
12pt"; you can't tell from the resulting font selector which  
construction was used, and they will in fact end up referring to the  
exact same internal TeX font number, so they'll be the same font in  
the DVI file.)

I think I'm inclined to maintain existing the behavior of \show and  
\fontname, which means they'd use the "compact" form. This is less  
likely to trip up macros that expect to parse the \fontname, for  
example. The trouble with this, of course, is that there might be  
cases where the compact name is not actually usable to re-load the  
font (e.g., if the name contains characters that XeTeX will  
misinterpret when re-parsing a compact font name into its  
constituents). That's one of the motivations for considering the more  
explicit form.

One answer to that would be a new \XeTeXfontname primitive, which  
would output a "long form" specification suitable for reloading via  
\XeTeXfont. It's probably less important what \show or \meaning  
produces, except that they are consistent, as I doubt they'd be used  
in the same way as the basis for creating a new font specification.

You have any thoughts on this? Does it seem like a worthwhile thing  
to pursue?

> I guess I'm still wondering if it's possible to dynamically add  
> (and subtract?) features to the current font, without a priori  
> knowledge.

This is tricky, as it modifies the meaning of a font selector on-the- 
fly, which effectively means creating a new font even though the user  
may think they're just changing the attributes of an existing one. It  
would have to allocate a new font number internally in TeX, so it  
doesn't save any TeX resources as compared with loading a "new" font  
with the new selection of features. But it might well be much easier  
for the user (or macro developer) than retrieving the current font  
name and features in order to modify them and load a new font.

I can imagine something like:

   \XeTeXadjustfeatures\myfontselector "Ligatures=Rare  
Ligatures;Numerals=Oldstyle Numerals"

or for the OpenType variety:

   \XeTeXadjustfeatures\myfontselector "+smcp,-liga"

but I'll need to think some more about what it would involve to  
actually implement this.

It's also occurred to me, by the way, that we probably want an  
\ifXeTeXnativefont test that lets you know whether extensions such as  
\XeTeXglyph, \XeTeXcharglyph, \XeTeXadjustfeatures (potentially),  
etc., are usable with a given font selector.

JK



More information about the XeTeX mailing list