Can't switch to lining numerals with Junicode and fontspec

You can remove the oldstyle feature with ..Off or ..Reset

\documentclass[12pt]{article}

\usepackage{fontspec}
\setmainfont{Junicode}[Numbers=OldStyle]

\begin{document}

123456789

\addfontfeature{Numbers=OldStyleOff} 123456789

\addfontfeature{Numbers=OldStyleReset} 123456789
\end{document}

enter image description here


Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use \liningnums you have to patch that too:

\documentclass[12pt]{article}

\usepackage{fontspec}
\setmainfont{Junicode}[Numbers=OldStyle]

\RenewDocumentCommand \liningnums {m}
{
  { \addfontfeature{RawFeature=-onum} #1 }
}

\begin{document}

123456789

\liningnums{123456789}

\addfontfeature{RawFeature=-onum} 123456789

\end{document}

enter image description here

Tags:

Fontspec