Configure the font

Before you begin

Complete the step Download and install the required fonts before you perform this step.

About this task

This procedure assumes the use of Japanese font Sazanami Gothic.

Procedure

  1. Copy the font that you are installing into the following directory on the Linux machine:
    • /usr/local/fop
  2. Navigate to directory /user/local/fop, if you are not there already.
  3. Run the following command in this directory:
    java -cp build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/commons-logging-1.0.4.jar:
        lib/xmlgraphics-commons-2.3.jar:lib/commons-io-1.3.1.jar
        org.apache.fop.fonts.apps.TTFReader 
        -ttcname "Sazanami Gothic" sazanami-gothic.ttf sazanami-gothic.xml
    The example introduces line spacing for readability. In actual practice, this is a single long command string.
    This action creates configuration file sazanami-gothic.xml in directory usr/local/fop.
  4. Move, or copy, files sazanami-gothic.ttf and sazanami-gothic.xml into the conf subdirectory.

What to do next

The next step is Register the font with Apache FOP.