Mac Musings

Inexplicable Cocoa Ligature Problem Solved

Daniel Knight - 2006.05.09

Last week I explained a problem I was having with GyazMail and a few other Cocoa apps. I would type "f" followed by "i" or "l", and my eMac would automatically replace "fi" with fi and "fl" with fl. It would also use smart quotes.

This had been going on for months, and I couldn't find any way of changing this behavior. It didn't impact my classic apps or Carbon programs, only software that used Cocoa.

I received dozens of emails in response to Cocoa Ligature Behavior Can Drive You Crazy, and most of them made the same two suggestions:

  1. Use a different font - one that doesn't support ligatures.
  2. Open the Font Panel (cmd-T, shown below), select my font, click on the gear, choose Typography (second image below), and turn off Common Ligatures.

The Font Panel

The problem with the first suggestion is that the font I was using, Lucida Sans, says it doesn't support typographic features such as ligatures. And the problem with the second suggestion is that because GyazMail is a plain text only email program, its author has no need to support the Font Panel.

Ny typographic features found

I was stymied - and then I received an email from Lyle Eslinger that simply stated, "You have probably run across this post, but in case not:"

That article, Re: 'fi' ligatures [solved], pointed me to the solution. Ricky Sharp wrote:

"Thanks to an off-list tip that I may be using a different font than others, I tracked the problem down to having two sets of Courier and Monaco in my Font Book. Specifically, I saw two entries for Regular and two for Bold. Deleting one of them removed the problem; I was able to view all my mail messages as they should be (i.e. 'f' and 'i' never combined anymore)."

Font Book

I went to Font Book and discovered that I also had two (and rarely three) versions of the same font, one on my OS X partition and another one being accessed from my OS 9 partition. Disabling the pre-OS X versions of these fonts immediately solved my problem.

Disable selected fontsIf you open Font Book, you'll see fonts with multiple copies marked with a dot (see above). If you open the marked fonts, you'll see the older versions of these fonts also marked with a dot. Select them (opt-click) and then click the disable button (a boxed check mark, see image on right). Confirm this, and problem solved.

I later discovered an even easier way to disable duplicates. Select a bunch of the font names with a dot behind them (option-click them), open the Edit menu, and select Resolve Duplicates. It's a lot faster.

No explanation as to why OS X is doing this weird stuff, but at least there's a way to fix the problem.

If you're running into weird type problems, like the ones I was seeing with ligatures, give the Font Book a try. Apple's free tool just might do the job.