xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alias John Brown <johnbrown...@hotmail.com>
Subject Re: Japanese Char Issues
Date Tue, 07 Apr 2009 04:11:51 GMT

Cheri Dennison <cherid <at> amazon.com> writes:

> I’m trying to get Japanese characters to show up in the PDF output. I’ve
> read
> in detail the earlier thread about this
> (http://www.nabble.com/Japanese-characters-do-not-appear-in-PDF-td21683276.html#a21683276)
> and tried to follow along with the suggestions there. But I’m still
> running
> into problems. I am using FOP 0.95 (released version).

Fop-0.95 works for me.

> --And in the PDF output, all the Japanese characters show up as squares
> everywhere.
> So, I believe this tells me that I need to find a font that handles the
> glyphs. So, I do this next:
> --Create a font metrics file for Arial Unicode 

With fop-0.95, there is no need for a font metrics file. Instead, modify
your fop configuration file. The relevant section is:

  <renderer mime="application/pdf">

That is, add <auto-detect/> to the <fonts> section of the PDF renderer.
Assuming that Arial Unicode is installed in the default location, you
should not have to do anything else to the configuration. Otherwise, you
may also need to add a tag like:

  <renderer mime="application/pdf">
        <directory recursive="true">C:\MyFonts</directory>

> --Update my DocBook customization layer to use ARIALUNI as the font. When
> I
> do all this, then when I open the PDF, Adobe gives me an error message
> that
> says “Can’t find or create the font ArialUnicodeMS. Some characters may
> not
> display or print correctly”. And the file has no characters—just dots here
> and there.

If it still is not working after modifying the config file, try a different
font. I am on Linux right now and I don't have Arial Unicode, so I used the
free Kochi Mincho font for the body, and regular Arial for the title. You
can download
this and other free Japanese fonts at 

I generated the PDF from the FO  like this:
fop -c my.xconf test.fo test.pdf

My DocBook file (not sure if Japanese characters will display properly):
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0">
    "Jinchūriki of the Sand"
  <para>"Suna no Jinchūriki" (砂の人柱力)</para>

The attached test.pdf shows the output.

View this message in context: http://www.nabble.com/Japanese-Char-Issues-tp22918536p22921882.html
Sent from the FOP - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message