Current maven plugin of DocBook buidling doesn't support Chinese characters

Bug #980580 reported by Ying Chun Guo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Low
Unassigned

Bug Description

Hi,

I tried to translate the manual documents into Chinese and built it with:
mvn generate-sources,
then I found the html pages were built successfully. But in PDF document, the Chinese characters cannot be displayed correctly. ###### is showed in the place where Chinese characters are expected. There are some warning message in the console:

WARN org.apache.fop.events.LoggingEventListener.processEvent(LoggingEventListener.java:80) - Glyph "编" (0x7f16) not available in font "CartoGothicStd-Bold".
WARN org.apache.fop.events.LoggingEventListener.processEvent(LoggingEventListener.java:80) - Glyph "程" (0x7a0b) not available in font "CartoGothicStd-Bold".
WARN org.apache.fop.events.LoggingEventListener.processEvent(LoggingEventListener.java:80) - Glyph "该" (0x8be5) not available in font "CartoGothicStd-Book".
WARN org.apache.fop.events.LoggingEventListener.processEvent(LoggingEventListener.java:80) - Glyph "书" (0x4e66) not available in font "CartoGothicStd-Book".

I think, this might be caused by the font setting in the maven plugin "clouddocs-maven-plugin". The font "CartoGothicStd-Book" is used but it cannot support Chinese characters. The same problem might occur to other languages too.

I'm not able to find the introduction of this maven plugin by Google. Is it a way to configure the font setting by maven?

Daisy

Revision history for this message
Anne Gentle (annegentle) wrote :

Hi Daisy -
I'm not sure but you can look at the source code at

https://github.com/rackspace/clouddocs-maven-plugin

Thanks for testing!

Changed in openstack-manuals:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

Hi, Anne

Thank you for responding. I checked the code. There is no way to configure font yet.

Do you know how to raise a request or send a bug to the development team of clouddocs-maven-plugin?

Daisy

Revision history for this message
Anne Gentle (annegentle) wrote :

Hi Daisy -
I subscribed Joe Savak, the product manager for the clouddocs-maven-plugin, to this bug. I'll check with him this week. So far we have been tracking their bugs here, though maybe we could start to use the Github issues for these specifics.
Thanks,
Anne

Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote : Re: [Bug 980580] Re: Current maven plugin of DocBook buidling doesn't support Chinese characters

Thank you, Anne.

I will recommend to make the font as a config option, as there may be need
to associate a font with
a particular language/localization. I looked into the source code of this
maven plguin. It's possible
to make this change.

If Joe wants Chinese font files for testing, I'm glad to help.

Regards
Daisy

<email address hidden> wrote on 05/16/2012 09:44:42 AM:

> Anne Gentle <email address hidden>
> Sent by: <email address hidden>
>
> 05/16/2012 09:44 AM
>
> Please respond to
> Bug 980580 <email address hidden>
>
> To
>
> Ying Chun Guo/China/IBM@IBMCN,
>
> cc
>
> Subject
>
> [Bug 980580] Re: Current maven plugin of DocBook buidling doesn't
> support Chinese characters
>
> Hi Daisy -
> I subscribed Joe Savak, the product manager for the clouddocs-maven-
> plugin, to this bug. I'll check with him this week. So far we have
> been tracking their bugs here, though maybe we could start to use
> the Github issues for these specifics.
> Thanks,
> Anne
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/980580
>
> Title:
> Current maven plugin of DocBook buidling doesn't support Chinese
> characters
>
> Status in OpenStack Manuals:
> Triaged
>
> Bug description:
> Hi,
>
> I tried to translate the manual documents into Chinese and built it
with:
> mvn generate-sources,
> then I found the html pages were built successfully. But in PDF
> document, the Chinese characters cannot be displayed correctly.
> ###### is showed in the place where Chinese characters are expected.
> There are some warning message in the console:
>
> WARN org.apache.fop.events.LoggingEventListener.processEvent
> (LoggingEventListener.java:80) - Glyph "编" (0x7f16) not available
> in font "CartoGothicStd-Bold".
> WARN org.apache.fop.events.LoggingEventListener.processEvent
> (LoggingEventListener.java:80) - Glyph "程" (0x7a0b) not available
> in font "CartoGothicStd-Bold".
> WARN org.apache.fop.events.LoggingEventListener.processEvent
> (LoggingEventListener.java:80) - Glyph "该" (0x8be5) not available
> in font "CartoGothicStd-Book".
> WARN org.apache.fop.events.LoggingEventListener.processEvent
> (LoggingEventListener.java:80) - Glyph "书" (0x4e66) not available
> in font "CartoGothicStd-Book".
>
> I think, this might be caused by the font setting in the maven plugin
> "clouddocs-maven-plugin". The font "CartoGothicStd-Book" is used but
> it cannot support Chinese characters. The same problem might occur to
> other languages too.
>
> I'm not able to find the introduction of this maven plugin by Google.
> Is it a way to configure the font setting by maven?
>
> Daisy
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openstack-manuals/+bug/980580/+subscriptions
>

Revision history for this message
David Cramer (david-thingbag) wrote :

We'll have to install the appropriate fonts in fop for this to work.

Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

Hi, David

What is "fop"? You mean, if Chinese fonts are installed in my Ubuntu, this problem won't occur?

Daisy

Revision history for this message
Anne Gentle (annegentle) wrote :

Hi Daisy -
David has been working on 1.4.0-SNAPSHOT to enable the appropriate fonts.

He says:
"You can try this now (build a pdf where you have xml:lang="zh" on the
<book> element).

There's one thing I'll still fix (the nbsp character isn't in this
font and the xsls stick in nbsps, so I'll remove those)."

Since I don't have any Chinese language source docbook files, could you please test by changing your pom.xml to point to 1.4.0-SNAPSHOT here?

<plugin>
                <groupId>com.rackspace.cloud.api</groupId>
                <artifactId>clouddocs-maven-plugin</artifactId>
                <version>1.4.0-SNAPSHOT</version> <!-- here -->

and let us know how it goes! Be aware of the missing nbsp character.

Also, feel free to send me Chinese language files if you want me to test as well.

Thanks,
Anne

Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

Yeah! It works wonderful!

Thank you, Anne and David.

Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: Triaged → Fix Released
Revision history for this message
Peng YuWei (pengyuwei) wrote :

Nice work!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.