Every month at the Pi General Meeting it seems that someone has a question about fonts. Many of these questions, when you look at what triggered them, are really about corrupt fonts. So what is a corrupt font and what do you do about it?
Fortunately, fonts cannot be bribed, eliminating one popular vector of corruption. But fonts are, at a basic level, computer files, and computer files can be corrupted by something writing over them, or being incompletely copied, or damaged in a crash, or, it seems, zapped by blasters wielded by invisible aliens from deep space. And a corrupted font can interfere with what is displayed on your screen, what you print, or even with system stability.
So how do you find corrupted fonts? There are any number of shareware and commercial programs for this task, but you can usually get by with what Apple provides: Font Book. Located inside your Applications folder, Font Book can preview fonts, print font samples, group fonts into collections – and find corrupt fonts.
Font 1: Font Book can not only display previews of fonts, but also check them for problems.
As a first step, launch Font Book, and select a single font. Then Select All, either from the menu or the keyboard. (See Figure 1.)
Font 2: After selecting all your fonts, use the File menu to select Validate Fonts. Your Mac will then methodically check each one.
With all the fonts selected, go to the File menu and select Validate Fonts (Figure 2). Your Mac will churn away for a bit, examining all the fonts, and display a report. In Mac OS X 10.4, the report is color-coded and includes a check mark (“Passed”), an exclamation point (“Minor problems”) or a red X (“Serious problems”); this is somewhat more refined in Mac OS X 10.5, which also tells you the number of fonts that passed or had problems. (See Figures 3 and 4.)
Font 3: Mac OS X 10.4 displays a color-coded key showing which fonts passed and which had problems.
Font 4: Mac OS X 10.4 displays not only the color-coded key, but adds summary statistics indicating how many fonts passed and how many had problems.
Once Font Book has completed its examination, you can use a menu at the top to show, for example, all the fonts with Warnings. Not only is this a quick way of sorting through the results, but it also gives an indication of what the problem might be, if any. In our example (Figure 5) several duplicate fonts were found. These were installed by Microsoft Office 2008, which blithely installed fonts previously installed by Microsoft Office 2004. Fortunately, this is merely untidy, and should present no real problems.
Font 5: In this example, Font Book indicates that 36 fonts have “minor problems,” and after examining the results, a pattern emerges: all these fonts are common to both Microsoft Office 2004 and Office 2008. Naughty, naughty, Microsoft.
If you do find serious problems, you may need some help. Simply removing
a damaged font may cause other problems, especially as quite a few fonts
are required for Mac OS X to operate correctly. In some cases, you may be
able to reinstall fresh copies of a given font, but in rare cases, a reinstall
of the operating system may be necessary.
If in doubt, ask about such problems on the Pi’s Web forums, the TCS (http://tcs.wap.org/). A second opinion (or a third, or eighth, or fifteenth) may help you decide if you have a minor annoyance or need to plan on major surgery.