TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I would like activate Libertine's discretionary and historical ligatures with ConTeXt and XeTeX compilation.

Currently, I'm using this:

\definetypeface[Libertine][rm][Xserif][Linux Libertine O]
\setupbodyfont[Libertine, 9pt]

fi ffl ct st

Any ideas?

share|improve this question

The cheap solution: You can enable font features globally by adding them to the default feature set:

%% The “default” set is always active.
\definefontfeature [default] [default] [

\definetypeface[Libertine][rm][Xserif][Linux Libertine O]
\setupbodyfont[Libertine, 9pt]

fi ffl ct st

For more precise control over when the ligatures are activated you will need a typescript. This lets you specify which feature sets are enabled for each type face individually. But you could as well turn ligatures off for, say, the bold face by requesting features=default in the relevant line. Below example applies the ligature set to all four serif faces:

%% 1. Create a feature set, inheriting the defaults.
\definefontfeature [extraligatures] [default] [liga=yes,script=latn,hlig=yes,dlig=yes]

%% 2. Map font files for Libertine to type faces, applying the “extraligatures” features.
\starttypescript [serif] [mylibertine]
    \definefontsynonym[Serif]           [file:LinLibertine_R]    [features=extraligatures]
    \definefontsynonym[SerifItalic]     [file:LinLibertine_RI]   [features=extraligatures]
    \definefontsynonym[SerifBold]       [file:LinLibertine_RB]   [features=extraligatures]
    \definefontsynonym[SerifBoldItalic] [file:LinLibertine_RBI]  [features=extraligatures]

% 3. Define corresponding type face identifier.
\definetypeface [mylibertine] [rm] [serif] [mylibertine] [default]

% 4. Use the font in the document.

% 5. Test all four defined styles.
\def\ligatest#1{\bgroup#1fi ffl ct st\egroup\par}

Output of above snippet.

NB: Xetex neither has good support in ConTeXt nor is it widely used. You might consider switching to MkIV which comes with greatly improved font handling facilities and is actively developed.

share|improve this answer

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.