summaryrefslogtreecommitdiffstats
path: root/src/object/sp-tspan.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-11-13 09:05:52 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-11-13 09:05:52 +0000
commit6ae14ec71c2c005cb03ef6e0f5146bc30441acc7 (patch)
tree8145f98d4c41cd8a1af775575fb910d0adf82b02 /src/object/sp-tspan.cpp
parentUpdate inkscape.pot (diff)
downloadinkscape-6ae14ec71c2c005cb03ef6e0f5146bc30441acc7.tar.gz
inkscape-6ae14ec71c2c005cb03ef6e0f5146bc30441acc7.zip
Fix alignment error for inline-size SVG 1.1 fallback text.
Puts white space at end of line into separate tspan when 'text-anchor' is not start.
Diffstat (limited to 'src/object/sp-tspan.cpp')
-rw-r--r--src/object/sp-tspan.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/object/sp-tspan.cpp b/src/object/sp-tspan.cpp
index cee3f7d37..bbd8818d6 100644
--- a/src/object/sp-tspan.cpp
+++ b/src/object/sp-tspan.cpp
@@ -60,7 +60,12 @@ void SPTSpan::build(SPDocument *doc, Inkscape::XML::Node *repr) {
this->readAttr( "dx" );
this->readAttr( "dy" );
this->readAttr( "rotate" );
- this->readAttr( "sodipodi:role" );
+
+ // Strip sodipodi:role from SVG 2 flowed text.
+ SPText* text = dynamic_cast<SPText*>(parent);
+ if (text && !(text->has_shape_inside() || text->has_inline_size())) {
+ this->readAttr( "sodipodi:role" );
+ }
SPItem::build(doc, repr);
}