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:

  1. Different font technologies use different file types and require different registration procedures;
  2. Not all font technologies are supported on all versions of Windows.

As to the first point: Tarma Installer's Setup program knows how to register and unregister most font technologies supported by Windows. All necessary functionality is built into Setup.exe; no external helper programs are required. All that you need to do is add the font files to your Tarma Installer project. Tarma Installer automatically recognizes font files and will mark them for registration as required.

With respect to the second point, there is not much Tarma Installer can do about the situation. However, Tarma Installer 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 Tarma Installer's Setup program.

Font technology

Extension

Windows

Setup?

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 Tarma Installer's Setup program uses when it installs the font (for example, Bkant.ttf).
During font registration, Tarma Installer's Setup program 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:

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 Tarma Installer, this folder is represented by the <FontsDir> variable. 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 Tarma Installer project, act as follows.

  1. Select the Project - Files page by clicking on its bullet in the Navigation area.
  2. On the Project - Files page, create the <FontsDir> installation folder if it isn't already present in the Installation Folders Tree. The easiest method is as follows:

    1. Right-click on Installation Files to open the installation folders context menu;
    2. Choose Insert Special Folder to open its submenu;
    3. Choose Fonts Folder from the submenu.
  3. Add the font file as an installation file to the <FontsDir> folder. If necessary, refer to the Installing Files topic for information about adding installation files to folders.
  4. 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:

    If you followed the procedure above, Tarma Installer will have set these options for you and you don't have to change anything.
  5. Repeat steps 3-4 as required for other fonts.

The net result is that the font will be installed and registered when your application is installed, and unregistered and removed when your application is uninstalled. All this is subject to the usual rules for file installation; in particular, Tarma Installer 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).