xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Ebersole <st...@hibernate.org>
Subject Re: Font registration
Date Wed, 08 Apr 2009 13:21:46 GMT
The previous problem was definitely some issue with 0.94 which has since
been corrected.  I upgraded to 0.95 and fixed the issue FOP was
complaining about (after finally tracking it down) in the DocBook
sources and the EmbedFontInfo is now found correctly, which I use to
build the DefaultConfiguration as suggested by Jason (though I do it
slightly differently then he does).

I have also ensured that the following xslt params are properly set
(based on an xslt template selection given 'l10n.gentext.language =
zh-CN':
1) monospace.font.family = ZYSong18030,AR PL UMing CN,Liberation
Mono,monospace
2) body.font.family ZYSong18030,AR PL UMing CN,Liberation
Sans,sans-serif
3) title.font.family = ZYSong18030,AR PL UMing CN,Liberation
Sans,sans-serif
4) sans.font.family = ZYSong18030,AR PL UMing CN,Liberation
Sans,sans-serif

Yet FOP is still not rendering my pdf using those fonts.  My only means
of verifying this is opening the pdf (lots of '#' marks instead of
Chinese glyphs), opening it's properties and checking the embedded
fonts.

So there is obviously still something I am missing:
1) Told FOP about the fonts (via DefaultConfiguration ->
FopFactory.userConfig)
2) Set the defined DocBook font family xslt params
('monospace.font.family', et al).
3) ???


On Tue, 2009-04-07 at 19:32 +0200, Andreas Delmelle wrote:
> On 07 Apr 2009, at 17:39, Steve Ebersole wrote:
> 
> Hi Steve
> 
> > I tried a mixture of the two.  I have a problem though.
> > FontInfoFinder.find is returning me null. Basically I have a directory
> > of fonts (.ttf and .ttc).  I was trying the following code fragment
> > (which is where FontInfoFinder.find is returning null):
> > <snip />
> >
> > So basically, for each direcrtory containing fonts
> > (environment.getFontDirectories()), I iterate the files
> > (fontDirectory.listFiles()).  So fontFile is the .ttf files.  I have
> > verified this in debugger.  Yet when fontInfoFinder.find is called on
> > that .ttf file, it returns null.
> 
> Most likely an issue with the TTF file. FOP still chokes on some TTFs  
> (mostly on Linux and Mac OS, or OTF variants)
> Do you get any log output indicating such a problem?
> 
> Checking the code, FontInfoFinder.find() will return null if:
> * there is a FontCache and the file has failed to load on a previous  
> attempt. We only display the corresponding message if the log-level is  
> set to DEBUG.
> 
> * the file failed to load, but it is the first attempt. In FOP Trunk,  
> a message is then broadcast to the attached EventListener (if it has  
> been registered).
> 
> 
> HTH!
> 
> Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
-- 
Steve Ebersole <steve@hibernate.org>
Hibernate.org


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


Mime
View raw message