XeTeXLinux Libertine as Roman Font gives strange Results

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

Linux Libertine as Roman Font gives strange Results

Post by mkaut »

I have a strange problem with Linux Libertine fonts, with TeX Live 2010 on Linux (2 machines, Ubuntu and Debian, both 64 bit):

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{Linux Libertine}
\begin{document}
The test: firefly, ``strict'', 1--2
\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:

Thanks,
Michal

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

Re: Linux Libertine as Roman Font gives strange Results

Post by shadgrind »

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
barabasz
Posts: 2
Joined: Thu Aug 01, 2013 7:49 pm

Linux Libertine as Roman Font gives strange Results

Post by barabasz »

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:

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\newcommand{\testline}{firefly, ,,qu<<{\o}>>te'', ---, \textemdash\par}
\begin{document}
\testline
\setromanfont{Minion Pro}
\testline
\end{document}
And here's the output:
minionpro-failure.png
minionpro-failure.png (12.8 KiB) Viewed 10913 times
Note, that ligatures are fine.

Regards,
Andrew
Last edited by localghost on Thu Aug 01, 2013 8:49 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Linux Libertine as Roman Font gives strange Results

Post by localghost »

Tell Xe(La)TeX explicitly how to typeset the ligatures.

Code: Select all

\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.


Thorsten
Attachments
minionpro-ligatures.png
minionpro-ligatures.png (11.23 KiB) Viewed 10913 times
barabasz
Posts: 2
Joined: Thu Aug 01, 2013 7:49 pm

Re: Linux Libertine as Roman Font gives strange Results

Post by barabasz »

It works as a charm, thank you Thorsten for that tip!
Regards,
Andrew
Post Reply