diff options
author | kitfox | 2012-07-13 03:37:27 +0200 |
---|---|---|
committer | kitfox | 2012-07-13 03:37:27 +0200 |
commit | 7d2660de723aa0d499251c9c147b59137a99cb69 (patch) | |
tree | 0444365fe30b3677e4e10b76f698e41089578887 | |
parent | Adding support for 'letter-spacing' attr in Tspan element. (diff) | |
download | svg-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.java | 4 |
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;
|