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 Tue, 07 Apr 2009 20:08:19 GMT
On Tue, 2009-04-07 at 21:11 +0200, Andreas Delmelle wrote:
> On 07 Apr 2009, at 20:00, Steve Ebersole wrote:
> 
> > This is in fact on Linux (Fedora).  The odd thing though is that I  
> > have
> > seen these fonts works in FOP on Linux in the publican builds (which  
> > is
> > the documentation build system used by Fedora and RedHat).
> 
> Are those the exact same font-files?
Positive.  Publican only runs on Linux boxes and specifically loads the
fonts from /usr/share/fonts, which is exactly from where I grabbed mine.

> 
> > They rely on <auto-detect/>-ion though, so maybe it just handles the  
> > fonts
> > differently than this code.
> 
> IIJC, one big difference between the auto-detection routine and your  
> approach is that in the first case, a FontEventListener will  
> automatically be registered. If you're working with the trunk code,  
> then you will probably want to look at using  
> FontInfoFinder.setEventListener() to be notified about failed attempts  
> to load the font.
This may just be an issue with 0.94.  I pushed it back up to 0.95 and
the fonts at least are getting recognized (I am getting EmbedFontInfo).
But upgrading to 0.95 is also, unfortunately giving me errors on the
docbook source or in the xslt :(

Guess I'll spend a little time and try to track that down

> 
> Roughly, something like:
> 
>      fontInfoFinder.setEventListener(
>          new org.apache.fop.fonts.FontEventAdapter(
>                 foUserAgent.getEventBroadcaster());
> 
> 
> 
> 
> If none is registered, it seems like find() assumes that you're not  
> interested in the event, and silently returns null, without giving any  
> indication as to what is going on (why the font fails to load).
> 
> > As another option, I read in the docs[1] that jars can be created  
> > with a
> > particular manifest entry and that FOP would automatically find them  
> > as
> > part of <auto-detect/>.  Curious which ClassLoader it uses for this?
> 
> I'm not 100% sure. That would most likely be the one that is used to  
> load the FopFactory, to which the font resources are attached (like  
> most resources that can be shared between runs).
> 
> 
> 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