FontCorruption

A corrupted font cache may manifest itself in 3 ways:

  1. Drawn bold and italic variants of a font are not used. This is quite common.

  2. Some glyphs are rendered wrongly, this happens but not that commonly.

  3. Crashes. This happens when applications use “rare” glyphs but is fortunately a rare problem. In TextMate this can be triggered e.g. by using find in project where the results are from binary files (which thus involves “rare” glyphs).

The workaround is to flush the font cache. To flush the cache run the following line in your shell (double check the line before you run it as it will remove the given directory and all files it contains):

sudo rm -rf /Library/Caches/com.apple.ATS

You can also settle with:

rm -rf "/Library/Caches/com.apple.ATS/$UID"

This will remove the font cache for only the current user.

After you have removed the cache you must reboot the machine. Although based on this hint you can also just kill the ATSServer server process.

Snow Leopard / Leopard Font Cache

Leopard users should run:

sudo atsutil databases -remove

to remove all font caches. To remove only the user font cache run:

sudo atsutil databases -removeUser

See this hint for more information.