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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im trying to typeset a book using fontspec and the EB Garamond font. I try first to use Lualatex because I wanted to experiment with some features of the impnattypo (french typography) package. However, at first I had some problems rendering OpenType features like historic ligatures, small caps in conjuction with caps to small caps, and almost all the contextual alternatives. Then, I found suggestions about a problem with lualatex, so I changed to XeLaTeX, and some of my problems got fixed, but some of them not. For example, I can't activate historic ligatures, I can't get the alternative "1" (feature cv11), and the TeX ligatures (--- and such) don't work. Here is a working example:

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8

\setmainfont{EB Garamond}

%Cool Small caps

%first paragrpaph definition

% cool french typography 
\usepackage[    hyphenation,

\setlength{\emergencystretch}{3em}  % prevent overfull lines

% footers and headers
    \fancyhf{} % clear all header and footer fields
    \fancyfoot[C]{\thepage} % except the center

\fancyhead[LE]{\small{\smallcaps{Some Author}}}
\fancyhead[RO]{\small{\smallcaps{Some Title For This}}}

% chapter start


Quienes queriendo. \textit{Quienes quieren querer queriendo.} 

---This should be an em-dash,and the ligature in this: Th should work. 

--This should be an en-dash and this historic ligatures should work: estaba octubre. 

--- These ones should not look like roman numerals: 111111. 



I tried the options in the fontspec manual, and also tried the suggestions from the font author's own specimen data and his recommendations for XeLaTeX use. I also tried using Mapping=tex-text and Ligatures=TeX with no success. I also tried changing from Raw OpenType features to fontspec defined features (like Ligatures={Historic}.

I don't know what else to do. I have scrambled around with this file all day with no success. And the worst thing is that I know I made it work before! but now I can't remeber how... :( I know there must be some little and obvious thing that I'm missing.

share|improve this question
Have you tried setting the default font features before setting the main font? – Silke Oct 30 '12 at 22:15
D-OH! Of course! thanks! fool of me.... – El Andi Oct 30 '12 at 22:17
up vote 6 down vote accepted

You need to declare the default font features before setting the font with \setmainfont.
Also make sure you didn't somehow end up with the TrueType version of the font.

Furthermore, it might be worthwhile to specify the files in more detail:

    [ Path        = /path/to/fonts/ ,
      Extension   = .otf,
      UprightFont = *12-Regular  ,
      ItalicFont  = *12-Italic ,
      BoldFont    = *08-Regular ]
share|improve this answer
Thanks for the suggestion, and now I know that I should do that. However, I'm pretty sure I'm using the OTF files (because I installed just those) and I wanted to let the system select automatically the correct optical size (12 for 11pt and higer sizes, 08 for 10 and lower sizes. It now works wonderfully! :) – El Andi Oct 30 '12 at 22:47

Your Answer


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.