add extra check for text drawing, seems to have a problem with
large fonts and may have nulll size
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194655
13f79535-47bb-0310-9956-
ffa450edef68
if(((int)fs) != fs) {
return false;
}
+ if(fs > 36) {
+ return false;
+ }
Element nodeElement;
for (Node n = element.getFirstChild();
(Vector)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
Paint forg = (Paint)aci.getAttribute(TextAttribute.FOREGROUND);
Float size = (Float)aci.getAttribute(TextAttribute.SIZE);
+ if(size == null) {
+ return;
+ }
Stroke stroke =
(Stroke)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.STROKE);
Float xpos =
(Float)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.X);
Float ypos =
(Float)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.Y);
+System.out.println("data:" + size + ":" + forg + ":" + xpos + ":" + ypos);
Float posture = (Float)aci.getAttribute(TextAttribute.POSTURE);
Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;
-// <!> FIXME : Those import clauses will change with new design
-import org.apache.batik.gvt.renderer.StaticRendererFactory;
-
/**
* This class enables to transcode an input to a pdf document.
*
// build the GVT tree
GVTBuilder builder = new GVTBuilder();
- ImageRendererFactory rendFactory = new StaticRendererFactory();
BridgeContext ctx = new BridgeContext(userAgent);
TextPainter textPainter = null;
textPainter = new StrokingTextPainter();