Open main menu

NOTE: This page is NOT finished yet

This page is at the very initial stages of development: Please do not change it yet unless you know the topic well!

LuaTeX and MkIV allow advanced usage and manipulation of Open Type open-type features. Some features, such as onum (oldstyle) and smcp (smallcaps) are known to most users of Open Type fonts, and virtually every open type font has default features for kerning (kern) and ligatures (liga). More advanced OT fonts can have lots more, including the Stylistic Set feature ss<nn> (where nn stands for any numeral between 01 and 99).

Features in general

In MkIV there are two kinds of font feature directly visible to the user: meta-feature and open-type feature.


Open-type feature

The open-type features are specified in the font and are composed of individual "lookups" which specify each substitution and positioning action to be performed in the processing. These open-type features are plugged in and out of the "stack" of lookups to be processed in the MkIV open type handler. These features are represented by a 4-character name (onum, smcp, etc.) and in MkIV are associated with a keyval that turns it on ("yes") or off ("no"). For example, '[onum=yes]'. Here the key 'yes' means "include open-type feature onum into the processed stack"; the key 'no' means "do not include open-type feature onum in the processed stack".

Meta-features are specified using \\definefontfeature. In the preamble to our document, an environment file, or even in a typescript file; we specify the default set of open-type features to be used. For example, using TeX-Gyre Schola we can specify the following default open-type features:

\definefontfeature
  [schola-preset]
  [mode=node,script=latn,language=dflt,kern=yes,liga=yes,lnum=yes]   

\definefontfeature

Stacking and unstacking features

\feature \addfeature \subtractfeature \replacefeature \resetandaddfeature \revivefeature \resetfeature

\addfeature        [f:mine] \feature [more][f:mine] \feature[+][f:mine]
\subtractfeature   [f:mine] \feature [less][f:mine] \feature[-][f:mine]
\replacefeature    [f:mine] \feature  [new][f:mine] \feature[=][f:mine]
\resetandaddfeature[f:mine] \feature[local][f:mine] \feature[!][f:mine]
\revivefeature     [f:mine] \feature  [old][f:mine] \feature[>][f:mine]
\resetfeature               \feature[reset]         \feature[<]

References


 
NOTE: This page is NOT finished yet