Actually, everything is fine with the code. The renderer is already
configured through the RendererFactory. I assume the problem is the
changed format of the userconfig.xml file. I've attached a demo file.
Note that each renderer has its own font setup now, mostly because every
renderer may have slightly different config values. PS, for example,
although it supports the same font subsystem, doesn't support the same
filter list config. BTW, the filter setup in the demo file shows how to
set the normal stream filter so page streams are not compressed and can
easily be inspected in a text editor.

Note that if you construct the renderer yourself and supply it through
the FOUserAgent, you need to call the configure method yourself. This
can easily be done through Avalon's ContainerUtil helper:

    ContainerUtil.configure(renderer, cfg.getChild("pdf-renderer"));

This also handles cases in which the Renderer doesn't implement the
Avalon Configurable interface and thus does not support configuration
through this means.

HTH

On 06.09.2005 22:05:27 Jeremias Maerki wrote:
> No particular reason, no. It's just some missing integration work. I'm
> configuring my renderer instances directly so I haven't used the
> FOUserAgent for that. If it's ok for you I'll quickly look into it right
> now and see what I can do. Actually, I wouldn't want to call configure
> during setUserAgent(). I will probably do that in the RendererFactory to
> have a central place to do that.
> 
> On 06.09.2005 21:45:12 Vincent Hennebert wrote:
> > Hi,
> > 
> > By trying to debug my FOrayFont adaptation I noticed that the user config 
> > file 
> > currently isn't taken into account by the Trunk.
> > 
> > The apps.FOUserAgent.getConfig() method is actually never called within the 
> > code, and (as a consequence I suppose) neither is the 
> > PDFRenderer.configure(Configuration) method, whose purpose is among other 
> > things 
> > to register fonts specified in the user config file.
> > 
> > Is there a particular reason for this situation? A simple fix would be to 
> > call 
> > configure within the AbstractRenderer.setUserAgent method, where we can get 
> > the 
> > user config file associated with the UserAgent given as parameter.
> > This is perhaps not the right place to do that? But if it's ok I can 
> > provide a 
> > patch.
> > 
> > Vincent
> 
> 
> 
> Jeremias Maerki



Jeremias Maerki

Attachment: userconfig.xml
Description: Binary data

Reply via email to