Register the font with Apache FOP
Before you begin
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
-
Open
fop.xconffor editing.To use the
vieditor, enter the following at a command prompt:vi conf/fop.xconf -
Find the following code in the <fonts> section:
<!-- auto-detect fonts --> <auto-detect> -
Immediately above the
<auto-detect>section, add something similar to the following example for each non-Latin1 language that you want to support.
Adding the<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>embed-urlattribute 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.
