Cocoa apps and the ligature 'feature'

Oct 05, '01 11:57:52AM

Contributed by: robg

In the thread The inseperable duo on the Macworld forums, aRichboy noticed some odd behavior in Cocoa apps. Namely, he was unable to edit certain character sets in some text input boxes. These character sets are known as ligatures.

So what's a ligature? Ligatures are two or more letters that run together in typesetting. Some common ligatures include ff, fl, ffi, tt, and ae. Apple has this to say about ligatures in its Cocoa developer docs:

"Text and Font Support: When you add the necessary objects to your user interface in Interface Builder, your application automatically gains many capabilities related to text editing:menu selection of font families, sizes, and styles and textual attributes such as alignment, kerning and ligatures;..."

What this means in every day use is that you may find yourself occasionally unable to edit a character you've just typed in. In testing last night, it appears to only affect the "fi" and "fl" ligatures. To see this 'feature' in action, open mail.app and start a new email. Type an email address like "asdflasdf@test.com" in the "To" field. Wait a second or so with the cursor at the end of this string, then hit the back arrow (not the delete key!). The cursor will jump over the "fl" pair, not allowing you to insert anything between them.

This behavior is only exhibited with proportional fonts; monospace fonts in the body of a plain-text email, for example, are not affected.

Not really a bug, but a feature that might surprise you if you're not aware of it. Thanks to aRichboy for pointing it out.

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011005115752701