xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas L Delmelle <a_l.delme...@pandora.be>
Subject Re: Dynamic Configuration migration of 'strokeSVGText' and 'fonts'
Date Thu, 16 Feb 2006 20:17:52 GMT
On Feb 16, 2006, at 18:12, Louis.Masters@log-net.com wrote:

Hi Lou,

> I am in the process of upgrading from FOP 0.20.3 to 0.91.  My  
> implementation uses both a config file and some programmatically  
> loaded options, but I do not see how to accomplish this in the new  
> version of FOP.  I am a little lost on how the Avalon configuration  
> maps to the FOP user agent's config settings.  My older code below  
> shows how I used to set the SVG stroke and add a font.  Can this  
> still be done programmatically and are the setting "keys" still  
> applicable?

Some details have changed, but roughly: yes, it can still be done.

> Configuration.put("strokeSVGText", Boolean.TRUE);
> //is this <strokeText value="false"/> in the image/svg+xml renderer?

I don't think so... This would be an option for rendering to SVG (not  
rendering of embedded or externally referenced SVG to PDF).

The good news --at least IIRC-- is that the option you need is now  
handled automatically. If nothing hinders rendering a portion of SVG  
text as PDF text instead of strokes, then the former is preferred.  
Strokes are only used when the SVG text has properties that make it  
too difficult or outright impossible to render it directly as PDF text.
[I'm not 100% sure here, maybe someone can confirm? This is the  
impression I gathered from a discussion on fop-dev between Thomas  
Deweese (Batik) and Jeremias a while ago... Bugzilla some-number-I'm- 
too-lazy-to-look-for-right-now ;-)]

> //config fonts
> Vector allFonts = new Vector();
> Vector allTrips = new Vector();
<snip />

Should also work roughly the same way as for 0.20.X.
One very important difference is that 0.91 still can't handle  
relative font URLs, but you don't seem to be needing these (?) The  
custom fonts are now also set per renderer, so they need to be added  
as descendant nodes of the renderer configuration.

Very, very roughly, it should look something like this:

Except that, for you, before the call to userAgent.setUserConfig(),  
you would need to add the extra config options to the Configuration  
as created from the xml file. Before initializing the Fop instance  
with the userAgent some configuration options can still be altered  
directly on the userAgent --as described a little higher up on that  
same page.

> I see a reference to the userconfig.xml file on "http:// 
> xmlgraphics.apache.org/fop/0.91/fonts.html" but I do not see that  
> file in the distribution.  I previously used this file to set some  
> application-level defaults, but I override in my code.

The example configuration is the file: conf/fop.xconf



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

View raw message