I've have the following example where i try to enable ligatures for the font Kaffeesatz

\definefontfeature[yanone-default][mode=node, kern=yes, liga=yes, dlig=yes]

\starttypescript [sans] [yanone]    
    \definefontsynonym [Sans] [Yanone-Regular] [features=default]

\starttypescript [sans] [yanone]
    \definefontsynonym [Yanone-Regular][name:yanonekaffeesatzregular][features=yanone-default]

\starttypescript [yanone]
    \definetypeface [yanone][ss][sans][yanone][default]

\usetypescript  [sans] [yanone]
\setupbodyfont  [yanone,36pt]


fi fl ff ffi ffl


The typesetting works, the font is used in the document but the ligatures are missing. Did i miss something important in the type-script or is



The specimen of the font shows exactly those five ligatures shown above in the code.

The used ConTeXt version is:

mtx-context     | current version: 2012.04.19 23:18
| improve this question | | | | |
  • 2
    The font has a broken liga feature, I don’t think it works anywhere. – Khaled Hosny May 15 '12 at 20:50
  • 1
    I contacted the developer of the font and he confirmed the bug. Even on his system he doesn't get the ligatures. I don't know if/when he is willing to release a fixed version. – Marco May 16 '12 at 16:49

Here is the code to fix the missing ligatures and a more complete typescript:

\startbuffer [yanone-feature]
lookup fligatures {
  lookupflag 0;
    sub \f \i    by \fi;
    sub \f \l    by \fl;
    sub \f \l    by \fl;
    sub \f \f \i by \ffi;
    sub \f \f \l by \ffl;

} fligatures;

feature liga {
  script DFLT;
    language dflt;
      lookup fligatures;
  script latn;
      language dflt;
      lookup fligatures;
} liga;
\savebuffer [yanone-feature]

\starttypescriptcollection [yanone]

  \starttypescript [\s!sans] [yanonesans] [\s!name]
    \definefontsynonym [\s!Sans]     [\s!name:yanonekaffeesatzregular] [\s!features=yanone]
    \definefontsynonym [\s!SansBold] [\s!name:yanonekaffeesatzbold]    [\s!features=yanone]

  \starttypescript [\s!sans] [yanonesanslight] [\s!name]
    \definefontsynonym [\s!Sans]     [\s!name:yanonekaffeesatzlight]   [\s!features=yanone]
    \definefontsynonym [\s!SansBold] [\s!name:yanonekaffeesatzregular] [\s!features=yanone]

  \starttypescript [\s!sans] [yanonesansthin] [\s!name]
    \definefontsynonym [\s!Sans]     [\s!name:yanonekaffeesatzthin]  [\s!features=yanone]
    \definefontsynonym [\s!SansBold] [\s!name:yanonekaffeesatzlight] [\s!features=yanone]

  \starttypescript [yanone]
    \definetypeface [yanone] [\s!rm] [\s!serif] [modern]     [yanone]
    \definetypeface [yanone] [\s!ss] [\s!sans]  [yanonesans] [yanone]
    \definetypeface [yanone] [\s!tt] [\s!mono]  [modern]     [yanone]
    \definetypeface [yanone] [\s!mm] [\s!math]  [modern]     [yanone]

  \starttypescript [yanonelight]
    \definetypeface [yanonelight] [\s!rm] [\s!serif] [modern]          [yanone]
    \definetypeface [yanonelight] [\s!ss] [\s!sans]  [yanonesanslight] [yanone]
    \definetypeface [yanonelight] [\s!tt] [\s!mono]  [modern]          [yanone]
    \definetypeface [yanonelight] [\s!mm] [\s!math]  [modern]          [yanone]

  \starttypescript [yanonethin]
    \definetypeface [yanonethin] [\s!rm] [\s!serif] [modern]         [yanone]
    \definetypeface [yanonethin] [\s!ss] [\s!sans]  [yanonesansthin] [yanone]
    \definetypeface [yanonethin] [\s!tt] [\s!mono]  [modern]         [yanone]
    \definetypeface [yanonethin] [\s!mm] [\s!math]  [modern]         [yanone]


\definefontfeature [yanone] [default] [featurefile=\jobname-yanone-feature.tmp]
\setupbodyfont [52pt]


\switchtobodyfont [yanone, sans]
fi fl ff ffi ffl - -- ---

\switchtobodyfont [yanonelight, sans]
fi fl ff ffi ffl - -- ---

\switchtobodyfont [yanonethin, sans]
fi fl ff ffi ffl - -- ---


The \startbuffer code simply writes the content to a file. You can also take the content of the buffer and save it in an external file. The filename is passed to featurefile. This corrects the missing ligatures.

The rest is a normal typescript which takes into account that the Yanone-Kaffeesatz has three weights. I specified latin modern as fallback for math and monotype. You can/should change that and use the fonts you want to combine with Yanone-Kaffeesatz.

When you don't use the \s! shortcuts you can also remove the \protect and \unprotect. Here is how it looks like:


| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.