From: Glen Mazza Date: Tue, 9 Sep 2003 18:49:42 +0000 (+0000) Subject: Updates due to changes in Batik library. X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f22b1209ccf12ccd0b4a398d8914afedc3035068;p=xmlgraphics-fop.git Updates due to changes in Batik library. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@196895 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/svg/PDFTextPainter.java b/src/org/apache/fop/svg/PDFTextPainter.java index 712b251c1..b88f085f5 100644 --- a/src/org/apache/fop/svg/PDFTextPainter.java +++ b/src/org/apache/fop/svg/PDFTextPainter.java @@ -70,6 +70,7 @@ import java.awt.font.TextAttribute; import org.apache.batik.gvt.TextPainter; import org.apache.batik.gvt.TextNode; import org.apache.batik.gvt.text.GVTAttributedCharacterIterator; +import org.apache.batik.gvt.text.TextPaintInfo; import org.apache.batik.gvt.text.Mark; import org.apache.batik.gvt.font.GVTFontFamily; import org.apache.batik.gvt.renderer.StrokingTextPainter; @@ -191,9 +192,15 @@ public class PDFTextPainter implements TextPainter { if (size == null) { return loc; } - Stroke stroke = - (Stroke)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.STROKE); + TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute( + GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO); + + if (tpi == null) { + return loc; + } + + Stroke stroke = tpi.strokeStroke; Float posture = (Float)aci.getAttribute(TextAttribute.POSTURE); Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);