Adding Multibyte Character Set Fonts for PDF Printing

From AgileApps Support Wiki
Revision as of 21:47, 4 June 2013 by imported>Aeric (Created page with "Single-byte fonts print properly but, while multibyte display properly on screen, an additional configuration step is needed to make them available to the PDF rendering engine. ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Single-byte fonts print properly but, while multibyte display properly on screen, an additional configuration step is needed to make them available to the PDF rendering engine.

To install multibyte fonts:

  1. Identify the fonts you need.
    For example, for any of the East Asian languages like Chinese, Korean, Hindi, or Japanese, you need the following font files:
    • batang.ttc
    • simsun.ttc
    • mangal.ttf
    • mangalb.ttf
  2. Locate those files.
    • If they are already part of your Linux installation, you should find them at /usr/share/fonts/msttcorefonts/
    • If they are not there, you can copy them to that location from a Windows 7 or Windows 8 installation, as they are OS-independent. You can find them in the /Windows/Fonts/ folder.
    • As a last resort, download the files from the web, and place them in /usr/share/fonts/msttcorefonts/
  3. Execute the commands to create that configuration file that the PDF rendering engine needs:
    cd {tomcat_install_dir}/lib
    java -jar pd4ml.jar -configure.fonts /usr/share/fonts/msttcorefonts/
    
    This step creates the pd4fonts.properties file, which contains a list of fonts.
  4. Restart Tomcat.
    The fonts are now available for use.