From 549f981cbd41532b3b94f38975411f517704166c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 27 Aug 2018 21:25:53 +0200 Subject: Fix rendering when a has a CSS 'display' property with value 'none'. --- src/object/sp-text.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/object/sp-text.cpp') 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); -- cgit v1.2.3