Fonts & Character SetsSelective f-ligature problem

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
jpehs
Posts: 5
Joined: Sat Apr 11, 2009 10:00 am

Selective f-ligature problem

Post by jpehs »

I use fontspec in XeTeX and everything is fine with a large range of ligatures available in various OpenType fonts, particularly Adobe OpenType Pro fonts. But I have a curious problem with some fonts, for example FF Scala and FF Quadraat (which aren't OpenType Pro).

The common ligatures for fi and fl sit, as with every other font I have, in the unicode numbers FB01 and FB02, but for some reason there seems to be no way for me to encourage XeTeX to typeset them. This problem only exists on a tiny number of fonts and I find it mystifying. Does anyone know how to forcibly instruct XeTeX to make those replacements for fi and fl? Is there a way of specifying unicode character codes to use for these instances in the preamble? Or am I stuck with having 'f's clashing with 'i's?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
hesitz
Posts: 12
Joined: Mon Jun 07, 2010 2:32 am

Re: Selective f-ligature problem

Post by hesitz »

I have the same problem as original poster who posted over a year ago. I'm using MikTex 2.8, which has a recent version of XeTeX, 0.9995.

With most OpenType fonts XeTeX substitutes 'fi' and 'fl' just fine. But with one I can vary the fontspec 'Ligature=' options all I want and the ligatures aren't used.

I've confirmed that the troublesome font has 'fi' and 'fl' glyphs in the correct spots, FB01 and FB02. I can insert them into a document directly using \char"FB01 or \char"FB02, but they never get used automatically.

Any ideas what the problem might be?

[EDIT: After a little more searching I think I found the problem. Ligatures have to have lookups defined from the source letter combination to the ligature glyph. The problematic font had no lookups defined. Next step is to see if I can define the ligatures in FontForge and get it working:
http://fontforge.sourceforge.net/editex ... ml#lookups]
[EDIT2: Adding the ligature lookups in FontForge worked fine. I was going to install FontForge in Windows, but didn't have xwindows in my cygwin install and was a little afraid to install it. So instead I fired up an Ubuntu VM, installed FF from the repository, and made the changes to my font. Not the most intuitive program to use, but the link above gives pretty good instructions on how to create the lookups.]
Post Reply