# [XeTeX] Problem getting ffi ligature

Gareth Hughes garzohugo at gmail.com
Wed Jun 24 17:17:40 CEST 2009

Dr J.D. Billett wrote:
> I've been trying to use TeX Gyre Termes as a Times New Roman substitute
> in typesetting a book with XeLaTeX (I've finally got the darned thing to
> compile after wading through a lot of errors that weren't a problem
> under pdflatex).  I am having trouble persuading XeLaTeX to give me the
> "ffi" ligature.  I am certain that it exists in Termes (at least, it's
> visible in Font Book).  But in its place I get an ff ligature followed
> by a regular i, as in the following minimal example:
>
> \documentclass[11pt]{memoir}
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text,Ligatures={Common}]{TeX Gyre Termes}
>
> \begin{document}
>
> \noindent fi fl ff ffi \\
> \textit{fi fl ff ffi}
>
> \end{document}
>
> Suggestions for how to fix this would be most welcome.  My book makes
> constant reference to the "divine oFFIce", so this is important!
>
> Jesse Billett

Hi Jesse!

I have replicated the problem here under Linux. It looks like a problem
with the font's GSUB table (do any TeX Gyre people read this?). In the
table, the definition f f → f_f comes before f f i → f_f_i. The problem
can be fixed by moving the latter definition before the former in the
table's order, or by creating a new definition that f_f i → f_f_i
anywhere in the table. If you have FontForge (free software), you can
edit the table yourself, but it's worth e-mailing the GUST e-foundry

Gareth.

--
Gareth Hughes

Department of Eastern Christianity
Oriental Institute
Pusey Lane
Oxford
OX1 2LE

+44 (0)1865 610227