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 trying to compile my .tex file using the xelatex command in TeXmaker (with MiKTeX), I get this error message:

! fontspec error: "font-not-found"
!
! The font "Linux Libertine O" cannot be found.
!
! See the fontspec documentation for further information.

I have looked at the fontspec documentation, but haven't found anything helpful.

My .tex file looks like this:

\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\begin{document}
\section{Unicode support}

\subsection{English}
All human beings are born free and equal in dignity and rights.

\subsection{Íslenska}
Hver maður er borinn frjáls og jafn öðrum að virðingu og réttindum.

\section{Ligatures}
\fontspec[Ligatures={Common, Historical}]{Linux Libertine O Italic}
Questo è strano assai!

\section{Numerals}
\fontspec[Numbers={OldStyle}]{Linux Libertine O}Old style: 1234567\\
\fontspec[Numbers={Lining}]{Linux Libertine O}Lining: 1234567

\end{document}

Does anyone have an idea of how I could fix this problem?

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. –  Sean Allred Mar 29 '13 at 23:53
    
Do you have that font installed? I guess that you are using Windows. But that font is default on Linux. –  Sigur Mar 29 '13 at 23:53
2  
@Sigur - OP is using MikTeX, so Windows not having that font is most likely. Perhaps download it? –  Sean Allred Mar 29 '13 at 23:57
1  
Try with \usepackage{libertine} (but make sure you have an up-to-date MiKTeX). Leave out the \setmainfont and \fontspec instructions, first. –  egreg Mar 30 '13 at 0:14
1  
Ok, I have tried again and everything works fine! So the solution is to replace \setmainfont and \fontspec by \usepackage{libertine}, as per egreg. –  ben Mar 30 '13 at 0:58

1 Answer 1

Choosing the right name for a font is sometimes hard. The specification

\setmainfont[Ligatures=TeX]{Linux Libertine O}

should work if you have the font among the system fonts. However XeTeX is able to use also fonts that reside in the TeX tree and are not in the system fonts.

In the case of Linux Libertine, the call should be something like

\setmainfont
      [ Ligatures = TeX,
        Extension = .otf,
        SmallCapsFeatures={Letters=SmallCaps},
        UprightFont    = *_R,
        ItalicFont     = *_RI,
        BoldFont       = *_B,
        BoldItalicFont = *_BI,
      ] {LinLibertine}

The package libertine frees you from this burden. Check the package documentation to see what options can be passed to the call

\usepackage[...]{libertine}

where ... stands for zero or more option, such as oldstyle or lining to choose between the two styles for figures.

share|improve this answer

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.