[XeTeX] Fontspec: Switching off a feature
Khaled Hosny
khaledhosny at eglug.org
Mon Mar 1 19:40:14 CET 2010
On Mon, Mar 01, 2010 at 03:48:02PM +0000, Jonathan Kew wrote:
> 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.
But, is there a reason for this, IMHO, discrepancy in behaviour? I was
expecting negating a feature turns it off always (and this what the lua
implementation of XeTeX font syntax does.
Regards,
Khaled
--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer
More information about the XeTeX
mailing list