Register the fonts with Apache FOP
About this task
The default configuration of Adobe FOP (and the fonts that it uses to build output PDFs) supports only the Latin1 character set, used by languages such as English, German, French, Italian, Spanish, Portuguese, and Dutch. 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 alphabets.
Procedure
-
Copy the following file into directory
C:/fopconfig/:C:/fop/conf/fop.xconf
-
Open fop.xconf for editing and find the following code in
the
<font>section.<!-- auto-detect fonts --> <auto-detect/> -
Remove the existing
<auto-detect/>element and replace it with the following code.
If you do not want to embed the font in the PDF document, do not include the<!-- Japanese --> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/msmincho.ttc" sub-font="MS Mincho"> <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> <!-- Chinese --> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/simsun.ttc" sub-font="SimSun"> <font-triplet name="Chinese" style="normal" weight="normal"/> <font-triplet name="Chinese" style="normal" weight="bold"/> <font-triplet name="Chinese" style="italic" weight="normal"/> <font-triplet name="Chinese" style="italic" weight="bold"/> </font> <!-- Russian --> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/arial.ttf"> <font-triplet name="Cyrillic" style="normal" weight="normal"/> </font> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/arialbd.ttf"> <font-triplet name="Cyrillic" style="normal" weight="bold"/> </font> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/ariali.ttf"> <font-triplet name="Cyrillic" style="italic" weight="normal"/> </font> <font auto-detect="yes" kerning="yes" embed-url="file:///C:/windows/fonts/arialbi.ttf"> <font-triplet name="Cyrillic" style="italic" weight="bold"/> </font>embed-urlattribute.
What to do next
The next step is Register FOP configuration and font family with PolicyCenter.
