[Tex/LaTex] Specify different fonts for bold and italic with fontspec

boldfontsfontspecitalicluatex

The main font I use for my LuaLaTeX document lacks bold and italic variants. I'd like to specify a different font for those variants using the fontspec package.

Initially what I had in my preamble was this:

\usepackage{fontspec}
\setmainfont{GFS Elpis}
\setmonofont{Courier}

and in order to use a different font for italics and bold, say Minion Pro, I tried putting the following line in the preamble just after the above shown lines:

\fontspec[BoldFont={Minion Pro}, ItalicFont={Minion Pro}]{GFS Elpis}

Unfortunately it doesn't seem to have any effect. Italics and bold passages in the document remain in upright font.

Could someone please help me with this issue?

Best Answer

You need to be specific if you declare the bold/italic/bold italic shapes, because fontspec does not automatically expand the font name:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[
 BoldFont={Minion Pro Bold}, 
 ItalicFont={Minion Pro Italic},
 BoldItalicFont={Minion Pro Bold Italic}
 ]{Linux Libertine O}

\begin{document}
normal \emph{italic}, \textbf{bold} and \textbf{\emph{bold italic}}.
\end{document}

Works fine with Minion/Linux Libertine O.

Sample image with Linux Libertine O and minion

Edit: changed to \setmainfont instead of \fontspec so that there is a correct and good example. Thanks Ulrike for pointing this out.