[XeTeX] Fontspec: Switching off a feature

Will Robertson wspr81 at gmail.com
Wed Mar 3 02:09:25 CET 2010


On 2010-03-02 02:18:02 +1030, Jonathan Kew 
<jfkthame at googlemail.com> said:

> Ok, that makes sense. The "-" settings are used to turn off features 
> that would be applied by default (such as liga, kern, etc), but they 
> will not turn off features that are being explicitly turned on in the 
> \font declaration itself.
> 
> So the way to implement this would be at the fontspec macro level, with 
> a \removefontfeatures macro analogous to \addfontfeatures. I don't know 
> how hard that would be to write, though.

I've been troubled by this for some time but haven't had the time to 
implement a \removefontfeatures macro.

It seems fairly uncommon to need it, however, and I encourage everyone 
to pre-define their fonts in the preamble, so in practise the lack of 
this feature hasn't kept me up at night.

An analogous problem is that certain OpenType features should 
deactivate other ones, so something like

\addfontfeature{Numbers=Lining}

should implicitly remove any +onum (etc.) features in the font 
declaration. That one requires some thought about how that information 
should be represented internally... one day :)

Will




More information about the XeTeX mailing list