Installing and Registering Fonts
Font files contain typefaces for screen display and printing. Over the years, new Windows versions have added support for new font technologies. This has two implications as far as font installation is concerned:
- Different font technologies use different file types and require different registration procedures;
- Not all font technologies are supported on all versions of Windows.
As to the first point: InstallMate knows how to register and unregister most font technologies supported by Windows. All necessary functionality is built in; no external helper programs are required. All that you need to do is add the font files to your InstallMate project. InstallMate automatically recognizes font files and will mark them for registration as required.
With respect to the second point, there is not much InstallMate can do about the situation. However, InstallMate knows which Windows versions support which font technologies, and will issue a warning if you try to build a project that installs fonts on inappropriate versions of Windows.
The following table gives an overview of font technologies and their support by Windows and the installers.
Font technology | Extension | Windows | InstallMate? |
---|---|---|---|
Bitmap/vector | .fon | All | yes |
TrueType | .ttf | All | yes |
TrueType collection | .ttc | 2000 and later | yes |
OpenType | .otf | 2000 and later | yes |
Type 1 | .pfm, .pfb | 2000 and later | no |
Warning - There is no fixed or standard relationship between the typeface name of a font and the name of its font file, and in particular some freeware and shareware font collections take a somewhat cavalier attitude towards this. The typeface name is what the customer sees once the font is registered (for example, Book Antiqua); the font file name is what InstallMate uses when it installs the font (for example, Bkant.ttf).
During font registration, InstallMate uses the actual typeface name (Book Antiqua), but to determine whether or not to install the font in the first place, Setup uses the file name (Bkant.dll). This can give rise to problems such as:
- A typeface that appears more than once on a customer's computer, because two font files with different file names each use the same typeface name.
- A typeface that suddenly disappears after installation of a new font, because the font file for the new font uses the same file name as an existing typeface, but contains a different typeface. (We have seen this happen with some of Windows' own fonts!)
There is little that can you can do about this, except extensive pre-deployment testing.
Fonts are typically installed as shared files in the Windows Fonts folder. Within InstallMate, this folder is available as Windows\Fonts. Unless you know what you are doing and have a very good reason to do otherwise, we recommend that you follow this convention.
How to add a font file to your project
To add a font to your InstallMate project, act as follows.
- Select the Files and folders project page in the navigation panel on the left.
On the Files and folders project page, click on the Windows\Fonts folder.
- Add the font file as an installation file to the Windows\Fonts folder. If necessary, refer to the Installing Files topic for information about adding installation files to folders.
Select the newly added font file in the Installation Files List to display its settings in the Installation File Settings pane, then check that the following options are set:
- Install action - Install if newer
- Remove action - Remove if installed
- Registration - Register as Font
- Shared file - checked
- Repeat steps 3-4 as required for other fonts.
The net result is that the font will be installed and registered when its component or your product as a whole is installed, and unregistered and removed when its component or your product as a whole is removed. All this is subject to the usual rules for file installation; in particular, InstallMate will correctly handle updates of existing copies of the font (based on a version check, if available) and will only remove the font if no other applications use it. This remains true even if the SharedDlls reference count of the font is unreliable (as is often the case with third-party fonts and Windows' own fonts).