9

I have a font named Berling containing fi and fl ligatures on glyph 109 and 110. How can I activate these with lualatex? For the moment I am trying:

\documentclass[a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}

\begin{document}
\setmainfont[ItalicFont={BerlIt}, Ligatures={Required}]{Berling}

Fi fi Fl fl \textit{Foo Fii fi}

\end{document}

But I get:

*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Ligatures=Required' (+rlig) not available for font
* 'Berling' with script 'Latin' and language 'Default'.
*************************************************

enter image description here


EDIT: I have now also tried (and both with and without Script=Default)

\documentclass[a4paper]{memoir}
\usepackage{fontspec}

\begin{document}
\setmainfont[ItalicFont={BerlIt}, Ligatures={Common, TeX}, Script=Default]{Berling}

Fi fi Fl fl \textit{Foo Fii fi}

\end{document}

6
  • Either the font does not have the features at all, or they are not registered for Latin script, try Script=Default, and see if it works. Commented Feb 17, 2013 at 17:13
  • 1
    Also do not use inputenc with lualatex/xelatex. These 2 already assume you use UTF-8 in your source.
    – ArTourter
    Commented Feb 17, 2013 at 17:39
  • Where did you get the font from?
    – egreg
    Commented Feb 17, 2013 at 18:43
  • 1
    The f-ligatures are usually contained in the Common ligature group rather than in the Required ligature group. You may want to try the option Ligatures=Common or, better still, Ligatures={Common, TeX} when executing the \setmainfont instruction.
    – Mico
    Commented Feb 17, 2013 at 18:45
  • 1
    Have a look at this answer: tex.stackexchange.com/a/31218/4427
    – egreg
    Commented Feb 18, 2013 at 9:20

1 Answer 1

7

Thanks to egregs help and this answer the I got the following solution which works for me:

\documentclass[a4paper]{memoir}
\usepackage{fontspec}

\begin{document}
\setmainfont[ItalicFont={BerlIt}, FeatureFile=myligatures.fea]{Berling}

Fi fi Fl fl \textit{Foo Fii fi}

\end{document}

And the following feature file:

languagesystem DFLT dflt ;
languagesystem latn dflt ;
feature liga {
       sub f i by f_i ;
       sub f l by f_l ;
} liga ;

enter image description here

Now I am gonna take a last look at the glyphs in that file and see if there are any other ligatures worth using :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .