[XeTeX] Fontspec: Switching off a feature

Jonathan Kew jfkthame at googlemail.com
Mon Mar 1 16:48:02 CET 2010


On 1 Mar 2010, at 15:36, Ulrike Fischer wrote:

> Am Mon, 1 Mar 2010 14:05:27 +0000 schrieb Jonathan Kew:
> 
> 
>>> At second \addfontfeature adds the new tags to the right, at the end
>>> of the list, but as the following example shows in general the first
>>> tag wins. 
> 
> 
>> I don't recall offhand, but your examples are not quite correct
>> and so they're not a valid test of the behavior:
> 
>> You need a separator (comma, semicolon) between features, so that should be
>> 
>>  \font\test="Junicode:+hlig,-hlig"
>> 
>> etc. See what happens then.
> 
> Ups, you are right. But this doesn't solve the problem, it even gets
> worse: now always the +-version (+onum, +hlig) wins. So you can't
> "remove" them with -onum and -hlig. 

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.

JK




More information about the XeTeX mailing list