Franz,

sorry, my fault. I didn't take into account that the text metrics for
the Java2D/PNG renderer are taken from Java2D and the ones for the area
tree XML are taken from FOP's internal font subsystem. I should have
told you that. Here's what you can do to let the area tree renderer
mimic the PNG renderer:

From: 
http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/ExampleConcat.java
(see also: http://xmlgraphics.apache.org/fop/latest/intermediate.html)

//Create a user agent
FOUserAgent userAgent = fopFactory.newFOUserAgent();

//Create an instance of the target renderer so the XMLRenderer can use its font 
setup
Renderer targetRenderer = userAgent.getRendererFactory().createRenderer(
        userAgent, MimeConstants.MIME_PNG); 

//Create the XMLRenderer to create the intermediate format (area tree XML)
XMLRenderer xmlRenderer = new XMLRenderer();
xmlRenderer.setUserAgent(userAgent);

//Tell the XMLRenderer to mimic the target renderer
xmlRenderer.mimicRenderer(targetRenderer);

//Make sure the prepared XMLRenderer is used
userAgent.setRendererOverride(xmlRenderer);

On 30.05.2007 17:31:42 fma-001 wrote:
> 
> Hi Jeremias!
> 
> Thanks for your hint - it works well.
> 
> But now I have another problem regarding evaluating the height. I use Arial
> as font and the area renderer does not calculate the height in Arial. I
> configured my userconfig.xml as following:
> http://www.nabble.com/file/p10876199/userconfig.xml userconfig.xml 
> 
> Is there anything wrong? Or is X-fop-areatree not able to calculate in
> Arial?
> 
> Thanks, Franz
> 
> -- 
> View this message in context: 
> http://www.nabble.com/FOP0.93%3A-png-output-in-optimized-height-tf3788704.html#a10876199
> Sent from the FOP - Users mailing list archive at Nabble.com.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to