xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernard Giannetti <thebernmeis...@hotmail.com>
Subject RE: Still having trouble loading fonts at runtime - suggestions?
Date Wed, 13 Jun 2012 22:20:49 GMT

Hi Phill,
I make a call to FOP itself to find the fonts - see FOPManager::InitialiseFonts in the code
from my first reply.  The magic line is
SortedMap<?,?> fontFamilies = new FontListGenerator().listFonts( ms_fopFactory, org.apache.xmlgraphics.util.MimeConstants.MIME_PDF,
fontEventListener );
I've looked at the FOP internal code and they simply squirrel through various directories,
based on the current OS, to find font files.  I call this code and then simply cache that
I suspect to add a font in at runtime you'd need to configure that in the FOP configuration
file - never had to do this myself.


> Date: Wed, 13 Jun 2012 07:20:46 -0700
> From: phillip.oldham@gmail.com
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Still having trouble loading fonts at runtime - suggestions?
> Hi Bernard
> Thanks for that explanation; that makes a lot of sense now.
> I think I'm still having a little trouble working out which are the line(s)
> where you're telling FOP which fonts are available, though.
> Specifically what I have is a byte-array containing a font's data, and I
> need to make FOP use that font when it renders an FO (there's no XSL
> translation - that has already been done).
> I've been through the docs a number of times now, but I can't see where I
> can add a font manually to FOP's runtime config, or tell it to refresh it's
> font cache after providing a directory of fonts, or anything like that. :(
View raw message