I'm trying to emulate the behaviour of a [pdf]LaTeX package that provides commands \lstyle
, \ostyle
, \tstyle
, and \pstyle
to activate lining, oldstyle, tabular and proportional figures, respectively. But they are context-dependent so that, for example, \lstyle
might be Proportional,Lining or Monospaced,Lining, depending on the current features. With traditional font selection commands I can use \f@family
to determine which family is current. Is there some way of doing this using fontspec
? The cautionary note in the documentation for \addfontfeatures
suggests otherwise.
\f@family
continues to store the name of the current font family. It does not obey ‘rules’ about a trailingj
orx
, though.\addfontfeatures
works might be useful to you. Lining numbers not working in certain fonts