Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I manually specify the Linux Libertine O font types fontspec should load, the bold type is significantly bolder than when I load the exact same font family as a system font.

MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont % load font from path
    [
        Path = C:/Windows/Fonts/,
        Extension = .otf,
        UprightFont = LinLibertine_R,
        BoldFont = LinLibertine_RB,
        ItalicFont = LinLibertine_RI,
        BoldItalicFont = LinLibertine_RBI,
    ]
    {libertine}
\newfontfamily\libertinesystemfont{Linux Libertine O} % load font from system font

\begin{document}
\LARGE{\textbf{A large heading in bold type}}

\textit{ABC\textbf{\underline{V\char"0306}}DE}.

\libertinesystemfont{
\LARGE{\textbf{A large heading in bold type}}

\textit{ABC\textbf{\underline{V\char"0306}}DE}.
}
\end{document}

enter image description here

Peeking into my .log file, I cannot detect anything that would explain why these font types look different:

.................................................
. fontspec info: "defining-font"
. 
. Font family 'libertine(0)' created for font 'libertine' with options [ Path
. = C:/Windows/Fonts/, Extension = .otf, UprightFont = LinLibertine_R,
. BoldFont = LinLibertine_RB, ItalicFont = LinLibertine_RI, BoldItalicFont =
. LinLibertine_RBI, ].
. 
. This font family consists of the following shapes:

[...]

. * 'bold' with NFSS spec.:
. <->"[C:/Windows/Fonts/LinLibertine_RB.otf]/ICU:script=latn;language=DFLT;"

[...]

. * 'bold italic' with NFSS spec.:
. <->"[C:/Windows/Fonts/LinLibertine_RBI.otf]/ICU:script=latn;language=DFLT;"

[...]

. Font family 'LinuxLibertineO(0)' created for font 'Linux Libertine O' with
. options [].
. 
. This font family consists of the following shapes:

[...]

. * 'bold' with NFSS spec.:
. <->"Linux Libertine O/B/ICU:script=latn;language=DFLT;"

[...]

. * 'bold italic' with NFSS spec.:
. <->"Linux Libertine O/BI/ICU:script=latn;language=DFLT;"
share|improve this question
    
You're using XeLaTeX, right? I can reproduce your findings when compiling your MWE with XeLaTeX but not when compiling it with LuaLaTeX. Under LuaLaTeX, there's no difference between the first and second groups of lines. –  Mico Jul 30 '13 at 12:56
    
@Mico: That's right, I compiled with XeLaTeX. When I compile with LuaLaTeX, only the bolder variant is produced in both groups of lines. –  Sverre Jul 30 '13 at 13:37
    
fontspec might be selecting optical sizes automatically in the second case. What happens if you add the option OpticalSize=0 to the system font? –  You Jul 30 '13 at 13:46
    
@You: As far as I can tell, nothing changes. –  Sverre Jul 30 '13 at 13:52

1 Answer 1

up vote 3 down vote accepted

It turns out that when compiling with XeLaTeX (but not with LuaLaTeX), fontspec doesn't load the bold fonts when it calls system fonts, but rather the semibold fonts, even though the .log file seems to state that the regular bold (B) and bold italic (BI) fonts have been loaded, rather than the semibold (Z) and semibold italic (ZI).

\documentclass{article}
\usepackage{fontspec}
\setmainfont % load font from path
    [
        Path = C:/Windows/Fonts/,
        Extension = .otf,
        UprightFont = LinLibertine_R,
        BoldFont = LinLibertine_RZ, % Linux Libertine O Regular Semibold
        ItalicFont = LinLibertine_RI,
        BoldItalicFont = LinLibertine_RZI, % Linux Libertine O Regular Semibold Italic
    ]
    {libertine}
\newfontfamily\libertinesystemfont{Linux Libertine O} % load font from system font

\begin{document}
\LARGE{\textbf{A large heading in bold type}}

\textit{ABC\textbf{\underline{V\char"0306}}DE}.

\libertinesystemfont{
\LARGE{\textbf{A large heading in bold type}}

\textit{ABC\textbf{\underline{V\char"0306}}DE}.
}
\end{document}

enter image description here

Why it does this, and why fontspec behaves differently in XeLaTeX and LuaLaTeX is not clear to me.

share|improve this answer
    
Actual font file selection is not done by fontspec, but by the engine itself (or packages like luaotfload in case of LuaTeX). –  Khaled Hosny Jul 30 '13 at 14:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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