0

I love using libertine font in my document. It looks nice and clear when compiled using pdflatex. But I got different result when compiled using xelatex. It seems to be a slightly bold in my screen. Is there any chances to get it nice and clear result in xelatex? thanks. // ps: I'm using TeX 3.14159265 (TeX Live 2014), texmaker 4.1 under ubuntu linux 14.04 lts.

\documentclass[12pt,a5paper]{memoir}
\usepackage{libertine}
\usepackage{lipsum}
\begin{document}
This is normal text, \emph{emphasized text}, and \textbf{bold text}.

\lipsum[1-4]
\end{document}

enter image description here

left: pdflatex. right: xelatex

Update #1: here's screenshot from the properties menu of the PDF viewer (Evince). Both pdflatex and xelatex use \usepackage{libertine}.

font comparison

Update #2: ...and this is when using \usepackage{fontspec}\setmainfont{Linux Libertine O} with xelatex (as @jason-zentz's answer).

using xelatex fontspec

  • 1
    Did you try printing it, or using a different viewer? – Juri Robl Feb 18 '15 at 17:15
  • 3
    Did you confirm that the same font is embedded in both PDFs (e.g., Linux Libertine O and not Linux Libertine T)? (You can use pdffonts or the properties menu of the PDF viewer for this.) – musarithmia Feb 18 '15 at 17:47
  • 1
    Do you see the same difference if you use \usepackage{libertine} with pdfLaTeX but \usepackage{fontspec}\setmainfont{Linux Libertine O} with XeLaTeX? You would need to have the .otf files installed in your system fonts directory for the fontspec approach to work, but it gives you a lot more flexibility (e.g., you can specify that the true bold rather than the default semibold should be used for bold text). – Jason Zentz Feb 18 '15 at 19:49
  • They look exactly the same when I compile your document (and yes, I do get LinLibertineT with pdflatex and LinLibertineO with xelatex, as expected). I only get some minor differences with kerning and hyphenations. My guess is that they only seem different because of your pdf viewer. As Juri says, print them and then compare. – Sverre Feb 18 '15 at 21:16
  • @AndrewCashner: they use different name. please see my update above. – guest_5758 Feb 19 '15 at 03:47
  • @JasonZentz: you're right. it looks much better when using \usepackage{fontspec}\setmainfont{Linux Libertine O} in xelatex. It show different fonts name in the properties menu (see update #2 above). I think this one works well for me for now. Thanks, mate :) – guest_5758 Feb 19 '15 at 04:06
  • @JuriRobl: I just saw it on screen (using default pdf viewer, Evince), then printed just now. Both look the same when printed. Thanks. – guest_5758 Feb 19 '15 at 04:13
  • @Sverre: Yes, they both look the same. I printed it just now :) I think I like this one, as the bold text doesn't change. Using \usepackage{fontspec}\setmainfont{Linux Libertine O} makes bold text looks slightly thinner in my opinion. Thanks :) – guest_5758 Feb 19 '15 at 04:34
  • 3
    @guest_5758, To get the true bold instead of semibold, use \setmainfont{Linux Libertine O}[BoldFont={Linux Libertine O Bold}]. See http://tex.stackexchange.com/q/126029/42880. – Jason Zentz Feb 19 '15 at 04:38
  • @JasonZentz: Now it works perfect. Thanks a lot, mate :) – guest_5758 Feb 19 '15 at 04:43
  • @JasonZentz Sounds like an answer :) (or, perhaps, a duplicate) – Sean Allred Feb 19 '15 at 05:51
  • @SeanAllred, I wouldn't say this is a duplicate of the semibold/bold question because the OP was seeing a difference in weight between the TrueType and OpenType versions of the normal roman, only in the PDF viewer and not on paper. @Sverre and I weren't able to replicate that problem, so it must be specific to the viewer. I just suggested the fontspec solution, and the bold/semibold issue is a side effect of that. I'm not sure why fontspec fixes the original viewer issue, since it calls the same OpenType font that libertine in XeLaTeX does. – Jason Zentz Feb 19 '15 at 16:55
  • This is possibly the actual explanation: https://tex.stackexchange.com/questions/305258/xelatex-font-rendering-tend-to-be-slightly-bolder-compared-to-pdflatex – ShreevatsaR Mar 24 '17 at 17:52

0 Answers0