Incorrect style inheritance in text when converting text to path

Migrated from: https://bugs.launchpad.net/inkscape/+bug/539174

Steps to reproduce:

To recreate from scratch:

  • open Inkscape
  • make sure that Settings->Text->"Use SVG2 flowed text" is unchecked Edit: also replicated with SVG2 flowed text
  • draw a text rectangle and type something ("Hello World")
  • Select tool -> Select the text -> set fill to a color
  • Text tool -> Select all text -> set fill to black again
  • Select a part of the text and make it italic to create a nested flowSpan
  • Convert the text object to a path.

What happened?

The second sentence becomes blue.

What should have happened?

The second sentence stays black. The flowRoot has a fill of #3399 (closed), but the flowPara has a fill of #000000. Inside the flowPara is a nested flowspan without a style attribute. Inkscape apparently incorrectly computes the style of the flowspan when converting to path.

Also affects SVG2 flowed text with nested tspans.

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (12e2a095, 2020-02-19)
  • Operating System: Windows 10
  • Operating System version: 10.0.18362

Migration info

reproduced on

  • Windows XP, bzr rev 9192
  • Inkscape 0.47pre4 r22446 (Oct 15 2009) (Ubuntu version 0.47~pre4-0ubuntu1, as included in karmic 9.10, on x86-64).

More complex example from the Launchpad bug: poster.svg (convert the text below "Methods" to see the italic parts of the text change color)

Edited by Jonathan Neuhauser