You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Sparkes <pe...@didm.co.uk> on 2014/05/25 16:50:57 UTC

svg text in fop on cocoon-2.1.12 Linex

Hi,

I am having problems with svg text in fop on  cocoon-2.1.12 Linux
The problem does not occur on cocoon-2.1.12 Windows

I get the following error whenever the svg contains <text> eg with

<fo:instream-foreign-object content-width="15px" content-height="100px" padding-right="0.2cm">
        <svg xmlns="http://www.w3.org/2000/svg" width="15.5" height="15.5" viewBox="0 0 15.5 15.5">
                <g>
                      <text x="6.0" y="11" style="text-anchor:middle ; fill:#ffffff ; font-size:10; 
font-weight:normal ; letter-spacing:-1.5">EUR</text>
                 </g>
          </svg>
  </fo:instream-foreign-object>

I get *exception*

javax.servlet.ServletException: Servlet execution threw an exception

*root cause*

java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.gvt.font.FontFamilyResolver
	org.apache.batik.bridge.SVGTextElementBridge.getFontList(Unknown Source)
	org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(Unknown Source)
	org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(Unknown Source)
	org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(Unknown Source)
	org.apache.batik.bridge.SVGTextElementBridge.computeLaidoutText(Unknown Source)
	org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(Unknown Source)
	org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
	org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
	org.apache.batik.bridge.GVTBuilder.build(Unknown Source)