From 6ae14ec71c2c005cb03ef6e0f5146bc30441acc7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 13 Nov 2019 10:05:52 +0100 Subject: 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. --- src/object/sp-tspan.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/object/sp-tspan.cpp') 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(parent); + if (text && !(text->has_shape_inside() || text->has_inline_size())) { + this->readAttr( "sodipodi:role" ); + } SPItem::build(doc, repr); } -- cgit v1.2.3