summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2012-07-13 03:37:27 +0200
committerkitfox2012-07-13 03:37:27 +0200
commit7d2660de723aa0d499251c9c147b59137a99cb69 (patch)
tree0444365fe30b3677e4e10b76f698e41089578887
parentAdding support for 'letter-spacing' attr in Tspan element. (diff)
downloadsvg-salamander-core-7d2660de723aa0d499251c9c147b59137a99cb69.tar.gz
svg-salamander-core-7d2660de723aa0d499251c9c147b59137a99cb69.tar.xz
svg-salamander-core-7d2660de723aa0d499251c9c147b59137a99cb69.zip
Now trimming text in <text> tag.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@120 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-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;