summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/kitfox/svg/Text.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/kitfox/svg/Text.java b/src/main/java/com/kitfox/svg/Text.java
index e107d79..1b2fb76 100644
--- a/src/main/java/com/kitfox/svg/Text.java
+++ b/src/main/java/com/kitfox/svg/Text.java
@@ -266,6 +266,10 @@ public class Text extends ShapeElement
if (obj instanceof String)
{
String text = (String)obj;
+ if (text != null)
+ {
+ text = text.trim();
+ }
strokeWidthScalar = 1f / fontScale;