xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Philippe Courson <jean-philippe.cour...@cognitran.com>
Subject Re: Chinese PDFs and non embedded fonts
Date Mon, 23 Apr 2012 13:35:21 GMT
Hi all,

Thank you for your replies.

Please find attached a sample FO file highlighting the issue and 2 configuration files: one
embedding the font, and another one referencing it.

I attached as well a small JAVA program I use to verify that the font is correctly installed.
 

For testing purpose, you can download the SimSun font from http://jumal.is.free.fr/SimSun.ttf.


1) I verify that the font is correctly installed:

~/Downloads/fop-1.0/test$ java AvailableFonts | grep SimSun
SimSun
java.awt.Font[family=SimSun,name=SimSun,style=plain,size=1]

2) I generate a PDF embedding the font:

~/Downloads/fop-1.0/test$ ../fop -fo test-fo.xml -c configuration-embedded.xml output-embedded.pdf
Apr 23, 2012 1:49:38 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
Apr 23, 2012 1:49:38 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in

The PDF produced is OK: Hello 仅供参考

3) I generate a PDF, using the same FO file, referencing the font:

~/Downloads/fop-1.0/test$ ../fop -fo test-fo.xml -c configuration-referenced.xml output-referenced.pdf
Apr 23, 2012 1:49:52 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
Apr 23, 2012 1:49:52 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in
Apr 23, 2012 1:49:55 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "仅" (0x4ec5) not available in font "SimSun".
Apr 23, 2012 1:49:55 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "供" (0x4f9b) not available in font "SimSun".
Apr 23, 2012 1:49:55 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "参" (0x53c2) not available in font "SimSun".
Apr 23, 2012 1:49:55 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "考" (0x8003) not available in font "SimSun".

FOP issues warnings telling that the glyphs are not available for the font (I just saw this
warning making this example),  and the PDF produced is having all glyphs replaced with '#':
Hello ####

Am I doing something wrong with the configuration or is this issue due a FOP limitation or
bug?

Thank you all in advance for your help

Best regards,
JP


Mime
View raw message