Fonts in PDF Output

The PDF format allows you to embed font definitions directly in PDF files. This means that even if a system does not have access to the fonts you've used in a document, it can still display the document correctly because the font definition is right there in the file.

Corda Server™ (both with Highwire™ documents and Corda® images) embeds most fonts within its PDF output. However, some fonts cannot be embedded.

This section includes the following topics:

Automatically Embedded Fonts

Corda Server automatically embeds most fonts within its PDF output. It retrieves font definitions from TrueType fonts installed on the system on which it is running. Corda Server looks for fonts in the directories specified in Corda Server Administrator.

If a requested font cannot be found on the system on which Corda Server is running, Corda Server uses the default font (TimesRoman) instead. It also uses the default font if a requested font's license does not permit the embedding of the font. A warning message appears in the Corda Server console output under either circumstance.

Note: If you do not want Corda Server to automatically embed fonts, use the setPDFEmbedFonts(false) Corda Embedder method or the @_PDFEMBEDFONTSno server command.

To Add or Modify the Embedded Fonts Directory

When you installed Corda 7, it either automatically located the system font directory or asked you to specify a directory in which it should look for TrueType fonts. For that reason, especially on Windows*, you rarely need to add or modify an embedded font directory.

If necessary, you can change or add font directories using Corda Server Administrator.

  1. Log in to Corda Server Administrator.

    If you do not know how to do this, see Using Corda Server Administrator.

  2. Using the menu on the left, go to the Image Templates / Font Files > TrueType Font Directories screen.

  3. In the Directory fields, specify the directories that contain TrueType fonts.

    Corda Server supports up to five directories.

  4. Click Submit Changes.

  5. Restart the Corda Server.

    If you do not know how to do this, see Stopping, Starting, and Restarting the Corda Server.

Non-Embedded (Standard) Fonts

Standard fonts, by default, are not embedded in Corda Server PDF output. These fonts include Courier, Helvetica, and TimesRoman. Because these fonts are included automatically in most PDF-viewing software, they do not need to be embedded.

When Corda Server gets a request for a font with the name helvetica, timesroman, or courier, it assumes that the font is a one of these standard fonts and it does not embed it. This means that any fonts in PopChart® or OptiMap™ Image Template files whose names consist of the words Helvetica, Lucida Sans, TimesRoman, Lucida Bright, Courier, or Lucida Sans Typewriter is rendered in PDF using standard fonts that are not embedded within the outputted file. This also means that fonts in HTML/XHTML documents with names consisting of helvetica, sans-serif, fantasy, timesroman, times, serif, cursive, courier, or monospaced are rendered in PDF with standard fonts that are not embedded within the outputted file.

To force standard fonts to be embedded

Generally, you do not need to worry about embedding standard fonts. However, in certain cases you may want to force Corda Server to embed standard fonts. Do this by modifying the server configuration file so that it maps a TrueType font on the system to the standard font you want to embed.

  1. With a text editor, open <product_root>\Server\config\pdf_config.txt .

  2. To force Corda Server to embed the TimesRoman font, add the following line:

    <TimesRoman>times new roman</TimesRoman>

    This assumes that the Times New Roman font is installed on the system and can be located in the default font directory (see To Add or Modify the Embedded Fonts Directory above). Alternatively, replace times new roman with the name of a font you want to use instead.

  3. If you want to force Corda Server to embed the Helvetica font, add the following line:

    <Helvetica>arial</Helvetica>

    This assumes that the Arial font is installed on the system, and can be located in the default font directory. Alternatively, replace arial with the name of a font you want to use instead.

  4. If you want to force Corda Server to embed the Courier font, add the following line:

    <Courier>courier new</Courier>

    This assumes that the Courier New font is installed on the system, and can be located in the default font directory. Alternatively, replace courier new with the name of a font you want to use instead.

  5. Save the changes and restart Corda Server.

Be sure to select font names that exist on the local system. On Windows*, try a font name in an HTML document to verify that it is available. The best way to do this is with code similar to the following:

<p style="font-family: arial, comic sans ms;">test text</p>

Verify that the desired font is indeed being used by putting in a second font that is very different.

Font Mappings For Different Character Encodings in Highwire

Corda Server supports mapping specific TrueType fonts to documents in certain encodings. For more information, see font_map.txt.