Font Configuration

To modify the font configuration file, select Font Configuration ... from the Format menu. The following dialog will appear.

The list on the left shows all of the typefaces that can be selected by mappings, either directly by entering them in the Font tab or indirectly by including them in a selection scheme. By removing an item from this list you make the typeface unavailable to TopLeaf even though the fonts in the typeface are still installed.

The warning message at the bottom of the dialog appears when you are editing the font configuration for the whole repository. This is a reminder that the changes you make apply to all publications.

If any problem occurred when locating the fonts on your system, the Messages button will be enabled. Click it to display the messages.

Select a typeface from the list to display the relevant details for each of the four styles in the right-hand pane.

Typeface styles

The Font Name drop-down list allows you to select one of the installed fonts. Changing this also sets the Typeface, Weight and Slant fields below to values that will cause TopLeaf to select this font. Before changing the Weight or Slant fields, make sure you understand how Windows applications select fonts based on typeface and style. Consult the relevant Microsoft documentation for more information. If in doubt, use the font drop-down to set them.

The most common reason for changing the weight and/or slant fields is when you want to simulate an effect for which there is no equivalent font. For example, if you have a typeface called “X” which provides only an upright normal-weight font, you can set the weight to bold in order to simulate the “X Bold” font.

The remaining fields in the right-hand pane control how fonts are used when creating a PDF.

The Skew Angle and Overstrike values are used for simulating italic and bold effects, respectively. These are normally only used if no physical font with the desired characteristic is available. The skew angle specifies a clockwise angle from the vertical used to distort the characters. A value between 10 and 20 gives a good result for most fonts. The overstrike value is a horizontal distance (in points) at which the characters are repeated to make them appear thicker. Acceptable results are usually achieved with very small values.

If the Font Name field in the PDF box has a value, this overrides the use of the Windows font. This is set automatically for the PDF core fonts Times, Helvetica and Courier. Clearing this field for these typefaces will force the use of the Windows font, rather than using the font built into the PDF viewer.

[Warning] Warning

In order to get the most accurate rendering, the font used when typesetting must have the same character metrics as the font used to render in the PDF. Take care to ensure this is true when changing the PDF Font Name field.

The Font File field is normally left blank. There is a bug in Windows which can prevent a font from being found if its name is longer than 31 characters. If this happens, you can enter the font file here so that the PDF builder can locate it. Note that this must be the full path to the file (for example, C:\Windows\Fonts\ARIALBD.TTF).

The Embed value controls whether the font is stored in the resulting PDF. Embedding a font guarantees portability because the font doesn't need to be installed when the PDF is viewed. Embedding will increase the size of the PDF. Note that the licences of some fonts do not allow embedding. A value of Default embedding means that embedding is controlled by the options in force when the PDF is created. Select Never embed to prevent the font from being embedded; this is an appropriate selection for the core fonts mentioned above. Select Always embed to force embedding; this would be appropriate for a custom or proprietary font that won't otherwise be available when the PDF is viewed.

The Embed subset only check box controls what happens when the font is embedded. If it is selected, only those characters actually used (a subset of the font) will be included in the PDF. If it is not selected the whole font will be included.

[Warning] Warning

Font subset creation is not supported for some fonts that use CFF (compact font format) outlines. When a font using CFF outlines is added to the font configuration, the subset option is turned off by default. It is recommended that you do not enable subset creation for these fonts to avoid data loss.

Font embedding can also be controlled by using a PDF profile.

Managing typefaces

If the Automatically add new typefaces box is checked, the installed typefaces are checked each time the font configuration is used. Any new typefaces which have been installed are automatically added to the list. Uncheck this option if your repository is located on a shared drive so that you can control when new typefaces are added.

To manually add typefaces to the list, press the Add... button. A dialog will appear showing the installed typefaces that are not in the current configuration. The add dialog can be empty if all of the installed typefaces are present in the configuration. Multiple typefaces can be selected for addition.

By default, the list only includes typefaces that have a character set which is compatible with Unicode. Tick the Include non-unicode typefaces checkbox to include typefaces that have their own private character set (for example, Symbol and Wingdings). See below for more information.

The Default button resets the styles of the selected typeface to their original values (as if created by the automatic font configuration builder).

The Remove button deletes the selected typeface from the list.

The Remove Unused... button examines all of the publications in the repository to determine which typefaces are being used. This includes typefaces referred to by a selection scheme or a character map. If there are any typefaces that are not referred to, a dialog is opened to display them. Select the check mark next to any typefaces you wish to remove and press OK.

Non-Unicode typefaces

Since XML data always uses the Unicode character set, in most cases you will only use typefaces that employ the Unicode, ASCII or Latin-1 character sets (these character sets are all compatible).

Some typefaces use a non-standard character set that contains graphic or decorative symbols rather than letters, numbers and punctuation. In Windows terminology, these are the typefaces that use a “symbol” character set.

As an example of using a non-Unicode font, let’s say you want to include an envelope symbol before a piece of text. A suitable symbol is available in the Wingdings font at character position 42. This could be done by creating a custom marker “WD” that selects the Wingdings font, and adding the following to the appropriate mapping customisation:


TopLeaf does not distinguish between Unicode and non-Unicode typefaces, so you must take care to select a typeface appropriate for the context in which it is used.