Find Invalid Font Files
Just because solving a problem is easy doesn’t mean it’s an easy problem. The issue of “corrupted” or out-of-spec font files causing operating system or application crashes is a long-standing thorn in the side of Mac users and administrators. That’s because font files are software that interacts directly with the OS, but that software is often judged (and purchased) on aesthetic, rather than technical, grounds. While the problem of bad font software isn’t likely to go away any time soon, it’s at least possible to solve the problem of locating and removing those files.
Beginning in OS X 10.5 (Leopard), Apple built in the ability to run validity checks on any font file. Those checks can be done when the fonts are loaded into Font Book, but they’re also run beforehand when your disks are indexed by Spotlight. By using mdfind, one of the command line tools that works behind the Spotlight interface, it’s easy to find all the indexed files that may contain bad font data. Open the Terminal and type:
mdfind "com_apple_ats_font_invalid == 1"
This short and simple trick will return a list of all the suspect font files stored on any machine, whether they’re loaded in one of your user’s font folders or just stored on a spare external drive. Push the command out with Apple Remote Desktop, and you’ve got a list of every questionable font on every machine at your whole company. Once you’ve located these potential problems, it should be easy to round them up and remove them before they cause additional frustration.
