Linux Libertine, libertineotf package and bold

Being interested by using the Linux Libertine font, I made some test with XeLaTeX and pdfLaTeX. My idea was to find a font that is suitable for use in xelatex, pdflatex and outside of any TeX flavour.

I was surprised to see that bold typefaces were heavier in pdflatex (with the package libertine) than in xelatex (using the \setmainfont command).

Then I tried the following code with xelatex :

\documentclass{report}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
%\usepackage{libertineotf}
\begin{document}
\chapter{Test}
This is a text (or so it seems).
\textbf{This is a bold text}
\end{document}


By commenting either the \setmainfont or the \usepackage{libertineotf} line, I noticed that the bold (chapter title for instance) where heavier when using the package. The same difference shows when using the libertine package (libertine, not libertineotf) with pdflatex.

Does anyone know if there a reason for that? Is there a way to have both giving the same result?

Thanks

-

Well libertineotf declares which font to use for bold:

 \setmainfont[Extension=.otf,
BoldFont=LinLibertine_RB,
....


And this can be a different font to the one found if you use only \setmainfont.

You can add \XeTeXtracingfonts= 1 to your document to get some more informations in the log-file. And you can compile with xelatex --output-driver="xdvipdfxm -vv" to see on the terminal which fonts are included.

-
Thanks. Indeed: the package libertineotf (and libertine with pdflatex) uses true bold (that's too heavy for me), while the \setmainfont command uses semibold. So that's why the first is heavier than the other. I tried to change bold to semibold (using the command \renewcommand{\bfdefault}{sb} but it doesn't find the proper font (and regular font is used instead). I'll try to investigate if there's an option in libertineotf package to use the proper semibold font in place of the bold. –  user11208 Feb 11 '12 at 6:35
@user11208: Change the bold font like libertineotf is doing it. Copy the orginal \setmainfont from the sty and then change the BoldFont-setting. –  Ulrike Fischer Feb 11 '12 at 14:49
Apparently you need to have \renewcommand{\bfdefault}{z} for proper semibold text. I have no idea why, but the documentation of newtx states this in an example using libertine (page 4 of the newtxdoc.pdf, version May 31, 2012). –  mSSM Jun 20 '12 at 16:10