4

This document compiles (in XeLaTeX), but the boldface numbers are set oldstyle. Why? How to use boldface lining digits with Linux Libertine?

\documentclass{article}

\RequirePackage{fontspec}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\def\Lpnum#1{{\addfontfeatures{RawFeature=+lnum;+pnum;-tnum;-onum}#1}}

\begin{document}

123\Lpnum{456}\textbf{\Lpnum{789}}

\end{document}

%%% Local Variables:
%%% TeX-engine:xetex
%%% End:

2 Answers 2

5

I've already suggested this approach in the answers about \tagform@ and \maketag@@@:

\documentclass{article}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}
\newfontfamily{\Lpnum}[Ligatures=TeX,Numbers=Lining]{Linux Libertine O}

\begin{document}

123\Lpnum{456}\textbf{\Lpnum{789}}

123\Lpnum{456}\textit{\Lpnum{789}}

\end{document}
1
  • Might be worth clarifying OP's (common?) misunderstanding: addfontfeatures doesn't actually change any fonts. Apr 14, 2012 at 11:41
3
\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont[Numbers=OldStyle]{Linux Libertine G}
\newfontfamily{\boldlibertine}{Linux Libertine G Bold}



\begin{document}


123456789 %oldstyle

\boldlibertine{123456789} %normal

123456789 %oldstyle again


\boldlibertine{\emph{123456789}} %bold italic


\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .