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?

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.

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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to