LaTeX forum ⇒ XeTeXLinux Libertine as Roman Font gives strange Results

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Posts: 1
Joined: Fri Apr 08, 2011 8:05 am

Linux Libertine as Roman Font gives strange Results

Postby mkaut » Fri Apr 08, 2011 9:15 am

I have a strange problem with Linux Libertine fonts, with TeX Live 2010 on Linux (2 machines, Ubuntu and Debian, both 64 bit):
  1. \documentclass{article}
  2. \usepackage{fontspec}
  3. \setromanfont[Mapping=tex-text]{Linux Libertine}
  4. \begin{document}
  5. The test: firefly, ``strict'', 1--2
  6. \end{document}

I have the package 'libertine' installed, which provides TeX version of the Linux Libertine fonts. If I in addition have ttf version of the fonts installed in the system, compiling the above example with XeLaTeX results in garbage (collection of strange accented characters), without any errors or warnings from XeLaTeX. If I remove the TTF fonts, I get the text but without ligatures. (OTF version of the fonts do not have any effect.) What is going on? :?

Note 1: Changing the font name to {Linux Libertine O}, or replacing the line with "\usepackage{libertine}", fixes the problem. But I would still like to understand what is happening.

Note 2: The previous note is not valid if one installs the ttf fonts from the Debian/Ubuntu ttf-linux-libertine package - there, the ttf font's name is "Linux Libertine O", so the solution from above will result in garbage - while the original code (using "Linux Libertine") will still result in a text without ligatures. (This is reported as a bug in Debian, but has not been fixed yet.) :cry:



User avatar
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Postby shadgrind » Sat May 14, 2011 12:47 pm

It must be a bug specific to Debian and Ubuntu, because on both of my Fedora systems (32bit F13, 64bit F14) running TeX Live 2010 your code (as is, without modification) seems to work fine when compiled with XeLaTeX; I get ligatures with the fi, fl, and double dash. In Fedora the "linux-libertine-fonts" package provides fonts named "Linux Libertine" and "Linux Libertine C", there isn't a "Linux Libertine O" as in your system.

Maybe you could try using the fonts from the Fedora package and see if that helps.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2

Posts: 2
Joined: Thu Aug 01, 2013 7:49 pm

Postby barabasz » Thu Aug 01, 2013 8:30 pm

Michał did you find a solution for this issue? I have very same problem with \set*font option. I'm running both MiKTeX (standalone) and LiveTeX (under Cygwin).

Each time I use non-standard font eg. \setromanfont{Minion Pro} all shortcuts for dashes, quotes, etc. go away, hence:

  1. \documentclass{article}
  2. \usepackage{fontspec}
  3. \newcommand{\testline}{firefly, ,,qu<<{\o}>>te'', ---, \textemdash\par}
  4. \begin{document}
  5. \testline
  6. \setromanfont{Minion Pro}
  7. \testline
  8. \end{document}

And here's the output:
minionpro-failure.png (12.8 KiB) Viewed 6760 times

Note, that ligatures are fine.

Last edited by localghost on Thu Aug 01, 2013 8:49 pm, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

User avatar
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Thu Aug 01, 2013 8:51 pm

Tell Xe(La)TeX explicitly how to typeset the ligatures.
  1. \setromanfont[Ligatures=TeX]{Minion Pro}

Other ligatures like "fi" or "fl" are typeset correctly because they are typeset as special characters. That's why PDFTeX does that, too.

minionpro-ligatures.png (11.23 KiB) Viewed 6760 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Posts: 2
Joined: Thu Aug 01, 2013 7:49 pm

Postby barabasz » Thu Aug 01, 2013 8:57 pm

It works as a charm, thank you Thorsten for that tip!

Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 2 guests