Linux Libertine: Change Numeral Set
In LuaLaTeX and XeLaTeX you can specifiy font features with the fontspec
package.
The Numbers
/RawFeature
features are
Lining
andUppercase
/lnum
: normal/majuscule figuresOldStyle
andLowercase
/onum
: medieval/minuscule figuresProportional
/pnum
Monospaced
/tnum
(t
stands for tabular)SlashedZero
/zero
: gives slashed 0
You can activate these features with either
\addfontfeatures{Numbers={OldStyle,Proportional}}
or
\addfontfeatures{RawFeature=+onum;+pnum}
If you use the libertineotf
package (which also provides shortcuts to change these settings in-document, cf the package manual), you can give these arguments directly as package options:
\usepackage[
libertine={Ligatures=TeX,RawFeature=+onum;+pnum},
biolinum={Ligatures=TeX,RawFeature=+onum;+pnum},
mono={Scale=MatchLowercase,RawFeature=+zero}]
{libertineotf}
If you don't you can still set the options directly when specifying the fonts:
\setmainfont[RawFeature=+onum;+pnum]{Linux Libertine O}
\setsansfont[RawFeature=+onum;+pnum]{Linux Biolinum O}
Here is an exemplary code:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\def\numbers{0123456789}
\begin{document}
\begin{tabular}{lrrr}
\textbf{Normal Zero} & Monospaced & Proportional & \\
Lining & \addfontfeatures{Numbers={Lining,Monospaced}}\numbers & \addfontfeatures{Numbers={Lining,Proportional}} \numbers & \\
OldStyle & \addfontfeatures{Numbers={OldStyle,Monospaced}}\numbers & \addfontfeatures{Numbers={OldStyle,Proportional}}\numbers & \\
\end{tabular}
\vspace{1ex}
\addfontfeatures{Numbers=SlashedZero}
\begin{tabular}{lrrr}
\textbf{Slashed Zero} & Monospaced & Proportional & \\
Lining & \addfontfeatures{Numbers={Lining,Monospaced}}\numbers & \addfontfeatures{Numbers={Lining,Proportional}} \numbers & \\
OldStyle & \addfontfeatures{Numbers={OldStyle,Monospaced}}\numbers & \addfontfeatures{Numbers={OldStyle,Proportional}}\numbers & \\
\end{tabular}
\end{document}
Use Numbers=OldStyle
:
\setmainfont[Numbers={OldStyle}]{Linux Libertine O}
From fontspec
's doc, table 4:
Feature Option Tag
Numbers = Uppercase/Lining lnum
Lowercase/OldStyle onum
Proportional pnum
Monospaced tnum
SlashedZero zero
Arabic anum
\documentclass{article}
\usepackage[libertine={Ligatures=TeX,RawFeature=+onum}]{libertineotf}
\begin{document}
0123456789
\end{document}
or also for the sans serif Biolinum
\usepackage[libertine={Ligatures=TeX,RawFeature=+onum},
biolinum={Ligatures=TeX,RawFeature=+onum}]{libertineotf}