My Mac (running OS X Lion) was exhibiting a problem whereby it paused for minutes at a time; the mouse moved, but no applications could respond (and they all showed the spinning beachball). Turned out to be a rogue ‘fontd’ process. This is how I fixed it.
So the symptoms were that occasionally applications would stop responding for a minute or two. This would especially happen when I launched a new app or browser window, and also occurred when I logged in after rebooting: it would hang with a near-empty screen, slowly opening my apps, waiting a(n agonising) couple of minutes between each one.
Enough to drive you to distraction.
Eventually I discovered that these pauses corresponded to the ‘fontd’ process taking large amounts of the processor (70%–100%). Tried killing the process; that didn’t work; tried moving my “~/Library/Fonts” directory out of the way—in case it was a corrupt font causing the problem—and that didn’t work either.
Finally figured that there might be sone kind of font cache I could clear out, and sure enough: Macworld’s How to clear font caches in Leopard (also applies to Lion) proved to be the solution. To summarise (or in fact quote):
To clear the current user’s font cache, first quit all running applications (otherwise, you may see font oddities after using the command), then open Terminal (in Applications -> Utilities) and run this command:
atsutil databases -removeUser
If you want to remove the font cache for all users, use this command, and provide your admin password when asked:
atsutil databases -remove
Once you’ve cleared the caches, you should stop and restart the ATS server with these commands:
atsutil server -shutdown
atsutil server -ping
It will take a second or two for the server to restart, but when it does, you should be good to go. If anything still looks odd, a logout and login should take care of any lingering issues.
Because I live on the edge, I didn’t bother closing applications, I just ran the commands, and it seemed to instantly fix the problem.
If you fear the command line (but you should not fear the command line), the Macworld article also notes:
(note that there are third party programs, such as the $10 Font Finagler, designed to clear font caches).
People keep telling me that Macs never have problems; they’re lying out of their big fat faces. Mine keeps having odd problems. Beginning to suspect that it doesn’t like me keeping my home directory on an NFS share. Heigh ho. Anyway, this was the latest one.