Table of contents

Abstract

A box of beautifully enticing promise

The extended analogy

The story on PDF files and fonts

Configuring the DITA Open Toolkit build file for FOP

Defining fonts in the FOP configuration file

XSL-FO stylesheets and FOP-registered fonts

The story on PDF files and fonts

By default, FOP and the Open Toolkit only recognize a few fonts (basically, serif, sans serif, and monospace). If you want to use others, you need to configure both FOP and the Open Toolkit to use them.

NOTE: Each PDF rendering engine has different font configuration requirements. The following discussion is for creating PDF files using the FOP renderer bundled with the DITA Open Toolkit.

Configuration of fonts for FOP is described on the Apache web pages for FOP. At Scriptorium, we have found that these instructions, while good for the standalone FOP, do not address all the issues for FOP with the DITA Open Toolkit.

FOP is not initially configured to recognize specific fonts. It defaults to a font-family value of “any.” According to the Apache FOP web site, “any” is mapped to the Times family. In my case, Times was not available, so my initial output was sans serif.

For the DITA Open Toolkit, customizing font usage requires changes in three places:

 

Next Page:
Configuring the DITA Open Toolkit build file for FOP


Scriptorium Publishing | Post Office Box 12761 Research Triangle Park, NC 27709 | (919) 481 2701 | info@scriptorium.com