13

When compiling this minimal document

\documentclass[a4paper]{scrartcl}

\usepackage{fontspec}
\setromanfont[]{Linux Libertine O}
\setsansfont[]{Linux Biolinum O}

\begin{document}
\section{Test \emph{emphasized} Text}
abcd ldbflsdbgf
\section{Test \textit{italic} Text}
\end{document}

with xetex (you must have installed Linux Libertine and Linux Biolinum on your System) I get the following:

Picture with two headings and a too light italic text in it

The emphasized/italic text is obviously not as bold as the rest of the section. Why does this happen and how can it be changed?

15

If I ask on my system

otfinfo -i /usr/local/texlive/2018/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RBO.otf

the answer is

Family:              Linux Biolinum O 
Subfamily:           Bold
Full name:           Linux Biolinum O Bold Oblique
PostScript name:     LinBiolinumOBO
Version:             Version 1.3.2 
Unique ID:           FontForge 2.0 : Linux Biolinum O Bold Oblique : 30-10-2012
Designer:            Philipp H. Poll
Designer URL:        http://www.linuxlibertine.org
Manufacturer:        Philipp H. Poll
Vendor URL:          http://www.linuxlibertine.org
Copyright:           Linux Libertine by Philipp H. Poll,
Open Font under Terms of following Free Software Licenses:
GPL (General Public License) with font-exception and OFL (Open Font License).
Created with FontForge (http://fontforge.sf.net)
Sept 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,2012
License URL:         http://www.fsf.org/licenses/gpl.html AND http://scripts.sil.org/OFL
License Description: GPL- General Public License AND OFL-Open Font License
Vendor ID:           PfEd

which means that the font doesn't correctly advertise its subfamily, which should be Bold Italic.

Solution:

\documentclass[a4paper]{scrartcl}

\usepackage{fontspec}

\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}[
  BoldItalicFont=* Bold Oblique
]

\begin{document}
\section{Test \emph{emphasized} Text}
abcd ldbflsdbgf

\textbf{\textit{\textsf{Italic}}}

\section{Test \textit{italic} Text}
\end{document}

enter image description here

For manually specifying the fonts:

\documentclass[a4paper]{scrartcl}

\usepackage{fontspec}

\setmainfont{Linux Libertine O}
\setsansfont{LinBiolinum}[
  Extension=.otf,
  UprightFont=*_R,
  ItalicFont=*_RI,
  BoldFont=*_RB,
  BoldItalicFont=*_RBO,
]

\begin{document}
\section{Test \emph{emphasized} Text}
abcd ldbflsdbgf

\textbf{\textit{\textsf{Italic}}}

\section{Test \textit{italic} Text}
\end{document}
  • Thank you very much! This seems to explain the issue but unfortunately this workaround fires me a "fontspec error: "font-not-found" The font "Linux Biolinum O Bold Oblique" cannot be found." so I seem to be needing to include the OTF files manually – chr May 21 '18 at 21:15
  • @chr It should work if you add the font to your system fonts. Otherwise, yes, you have to add the font files manually. – egreg May 21 '18 at 21:16
  • By the way, Libertinus Sans doesn't have a bold italic version. – egreg May 21 '18 at 21:17
  • the Libertine fonts are added to my system fonts but seemingly this stuff is different under Windows – chr May 21 '18 at 21:21
  • 1
    @chr I added how to load the fonts manually. I guess that the first way depends on the OS (and I'm not on Windows). – egreg May 21 '18 at 21:21
2

This depends on the fonts available. I also seem to lack Biolinum in a bold oblique shape as a system font, as it is not included in the SourceForge distribution. You could substitute something similar, as below (I grabbing Tex Gyre Heros, but perhaps something better is available):

    \setmainfont[]{Linux Libertine O} %\setmainfont, rather than \setromanfont

    \setsansfont[
    ItalicFont = LinBiolinumOI,
    BoldFont = LinBiolinumOB,
    BoldItalicFont = TeXGyreHeros-BoldItalic,
    BoldItalicFeatures = {Scale =0.85},
    ]{Linux Biolinum O}

enter image description here

Looks like egreg (as usual) has a better solution!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.