A Mac suddenly displayed the message “Your startup disk is almost full” to the user. However, there should be plenty of space left on the disk. Something was eating up the disk rapidly.
Some investigation using Activity Monitor showed that a process called fontworker was also eating a large chunk of the CPU as well. In the Terminal I entered the command:
cd /
sudo du -sm *
to find out what folder was using most space (the command requires admin privileges so it will prompt you for the administrator password). I then entered:
cd the-folder-name
sudo du -sm *
to find out what was using most space in the largest folder (replaced by “the-folder-name” in the example above). I repead the steps until I found a large file containing the fonts database occupying about 85 GB which is way more than normal.
It turned out the fonts cache had become corrupt.
To rebuild the font cache was easy. By simply restarting the computer into Safe mode and then reboot it back into normal mode, the font cache was cleared and rebuilt, solving both the disc and CPU problem.
Problem with the fonts sometimes occurs after OSX reinstall which in this particular case had been performed about a week ago.