I'm trying to use the libertine
package instead of using the installed Libertine fonts on my machine (macOS). It seems that after adding the libertine
package, it overrides my sans-serif font and uses Libertine instead of Biolinum.
I have the following layout:
\documentclass{book}
\usepackage{fontspec}
% \usepackage{libertine}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\sffamily\bfseries\LARGE}
{\filright \sffamily\mdseries
\fontsize{10em}{0em}\selectfont
\oldstylenums{\thechapter}}
{1em}
{\filright}
\begin{document}
\chapter{Chapter 1}
\end{document}
If I build this with xelatex
, I get the following output:
If I uncomment the \usepackage{libertine}
, this will be rendered instead:
The big 1
is rendered with the Libertine font instead of Biolinum, even though the \titleformat
block uses \sffamily
.
Is there a way I could force the sans-serif rendering?
\oldstylenums
and loading the libertine package withosf
.\oldstylenums
worked!