[lltx] query about disabling OT font features
Will Robertson
will.robertson at adelaide.edu.au
Sat Dec 31 16:14:46 CET 2016
Dear all,
I’m trying to sort out some of the interfaces in fontspec, and I’m slightly confused/unsure about how to handle “de-activating” OpenType features, such as “-smcp”.
Under what scenarios would it make sense to use “-FEAT”, where “FEAT” is an OpenType feature tag?
I know that a number of font features are activated by default by XeTeX and luaotfload, such as +liga. Presumably this is one scenario.
Can a font automatically select a font feature? E.g., if a font supports both +lnum and +onum and hypothetically has +onum as default, can it be deactivated with -onum ?
I know XeTeX and luaotfload are also clever enough for -FEAT to cancel out +FEAT, but I’m trying to avoid that ever happening as a result of a fontspec call.
Is there anything else I’m missing?
* * *
The context is that I’m adding new logic to fontspec to strip out unnecessary strings in the font call, so something like
\addfontfeature{Numbers=OldStyle}
\addfontfeature{Numbers=Lining}
\addfontfeature{Numbers=OldStyle}
will result in a font that has just “+onum" rather than (as at present) “+onum;+lnum;+onum”.
What I’m thinking at present is that all OpenType feature tags will have three invocations:
Type=FeatureName: +FEAT
Type=NoFeatureName: -FEAT
Type=ResetFeatureName: <remove either +FEAT or -FEAT from the features list>
* * *
Happy celebrations for the new year!
Will
More information about the lualatex-dev
mailing list