summaryrefslogtreecommitdiffstats
path: root/src/object/sp-text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/sp-text.cpp')
-rw-r--r--src/object/sp-text.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp
index abb8ac6d8..4739f6b12 100644
--- a/src/object/sp-text.cpp
+++ b/src/object/sp-text.cpp
@@ -599,6 +599,11 @@ unsigned SPText::_buildLayoutInput(SPObject *object, Inkscape::Text::Layout::Opt
int child_attrs_offset = 0;
Inkscape::Text::Layout::OptionalTextTagAttrs optional_attrs;
+ // Per SVG spec, an object with 'display:none' doesn't contribute to text layout.
+ if (object->style->display.computed == SP_CSS_DISPLAY_NONE) {
+ return 0;
+ }
+
if (SP_IS_TEXT(object)) {
SP_TEXT(object)->attributes.mergeInto(&optional_attrs, parent_optional_attrs, parent_attrs_offset, true, true);