Windows stores font information in the Registry. And sometimes the Fonts section in the Registry can get invalid entries in it. The article shows you how to manually remove these entries with the Windows Registry Editor.
We will start with a bit of background on how Windows handles fonts. Installed fonts are typically stored in the \windows\fonts folder. Windows also keeps this list in the Windows Registry. When Windows boots, it reads the list from the Registry and loads the font list into memory. This list is then made available to other applications via a Win32 API call - EnumFontFamilies().
The Registry stores fonts under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts. The "name" portion of the key stores the font name and the data portion stores the font file name. For example, in the screenshot below, we see that the font "Alba" is stored int eh "alba.ttf" file.
If the data portion contains no path, just a filename, then the font file is assumed to be in the \windows\fonts folder. And that is where things can get sticky.
Windows does allow you to install fonts without copying them to the windows\fonts folder. You can right drag a font file to the Fonts window and Windows will prompt you with a popup menu. (To right drag a file, hold the right mouse button while dragging, instead of the left.)
Selecting "Create Shortcut(s) Here" will leave the TrueType file in the original location, and simply put a link to the font in the Registry. The images below shows the Windows Fonts folder and the corresponding registry entry after we have right dragged a dingdong.ttf file from c:\dev\fonts to the Windows Fonts folder. Note that the font now has a shortcut arrow next to it in the folder view.
But what happens if I delete the original c:\dev\fonts\dingdong.ttf file? Nothing initially. The Registry entry will remain. But the font will not be available to Windows. If you double click the font icon to see a preview, the normal font preview window is not displayed because Windows can't locate the TTF file. If you select an invalid font in Word or other applications, you might see a default font like Courier, instead of the invalid font. So it is a good idea to keep invalid font entries out of your Registry.
The best thing to do is to delete the invalid registry entry. If you have the Registry open and the key selected, press the DEL key to remove the entry.
To summarize, the steps for removing an invalid TrueType font from the registry are
Note that this same technique can be used to remove invalid Adobe Type 1 fonts. However, Windows stores Type 1 font data under a different key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Type 1 Installer\Type 1 Fonts. It looks like the screen below.
The Data portion of the key for a Type 1 font file contains the name of both the PFM and PFB file. But you can simply highlight the key and press DEL to remove an invalid Type 1 font entry.
That is all there is to it. You might need to restart any applications or reboot Windows to see the full effect of your changes.
-- Bryan
061013