Register the font with Apache FOP

Before you begin

Complete the step Configure the font before you perform this step.

About this task

The default configuration of Adobe FOP (and the fonts that it uses to build output PDFs) supports the Latin1 character set only. Languages such as English, German, French, Italian, Spanish, Portuguese, and Dutch use the Latin1 character set. The default configuration does not support languages with non-Latin alphabets such as Russian (Cyrillic alphabet), Japanese, and Chinese. Thus, you must specifically configure the fop.xconf file to support the Russian, Japanese, and Chinese alpahbets.

Procedure

  1. Open fop.xconf for editing.

    To use the vi editor, enter the following at a command prompt:

    vi conf/fop.xconf
  2. Find the following code in the <fonts> section:
    <!-- auto-detect fonts -->
    <auto-detect>
  3. Immediately above the <auto-detect> section, add something similar to the following example for each non-Latin1 language that you want to support.
    <font metrics-url="sazanami-gothic.xml" kerning="yes" embed-url="sazanami-gothic.ttf">
      <font-triplet name="Japanese" style="normal" weight="normal">
      <font-triplet name="Japanese" style="normal" weight="bold">
      <font-triplet name="Japanese" style="italic" weight="normal">
      <font-triplet name="Japanese" style="italic" weight="bold">
    <font>
    Adding the embed-url attribute embeds the named font in the generated PDF document. This enables one to view and properly display the PDF on an operating system that does not contain the necessary font.

What to do next

The next step is Register FOP configuration and font family with PolicyCenter.