[XeTeX] \font syntax

Hans Hagen pragma at wxs.nl
Tue Jul 31 16:38:58 CEST 2007

William Adams wrote:
> On Jul 31, 2007, at 9:56 AM, Jonathan Kew wrote:
>> Another thing I've sometimes considered is an extended \XeTeXfont
>> command with optional keyword-argument pairs:
>>    \XeTeXfont\serp = "Serpentine" renderer "ICU" mapping "tex-text"
>>        features "+smcp;+onum;-liga" slant "0.2" at 12pt % etc
>> as an alternative to packing everything into the "filename" that
>> \font expects. We already have the "scaled" and "at" keywords for the
>> \font command, but why not extend this to cover more aspects of
>> instantiating a font?
> _This_ I really like.
> It would handle a lot of things elegantly and nicely and has a lot of  
> potential (esp. in the ``%etc'').
> It might be worth discussing it w/ the luatex folks to see what they  
> think --- if a standardized interface for this could be worked out  
> for both xetex and luatex life for folks like Hans would become much  
> simpler I believe.

luatex has no interface ... it accepts things like

\font\test=whatever^@123#<>crappy-syntax+you/can=comeupwith at 10pt

\font\test={whatever^@123#<>crappy-spaced s y n t a x 
+you/can=comeupwith} at 10pt

and the user (package writer) can intercept this string and do whatever 
he/she likes; so, i can implement a xetex like interface if i want to
(although context defines features in a different way and then passes 
them to the engine)

so, an extended syntax like

   \font\test={any kind of spec} at 10pt

can be supported.

Concerning support for an exact xetex like syntax in luatex ... this is 
not possible because it is pdftex compatible by default which means that 
"somename" is equivalent to somename (" is used to capture names with 
spaces); however, since lookups can be implemented it's not that hard to 
mimick basic xetex behaviour, which says nothing about what actually is 
done with the specification (since the engines differ).

btw, is there a way to nil the default features, i.e. no ligatures by 
default (without need for -liga)?


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the XeTeX mailing list