PDF Internal import of text with gradient positions gradient incorrectly

Split off from inbox#2473 (comment 328883445)

Steps to reproduce:

For a general case, create the file like so:

  • Create some text
  • Add a gradient to it
  • Save as pdf
  • Import the pdf back into Inkscape

What happened?

  • File imports okay, but the gradient is displaced on each letter (in two ways)
    • First, displacement so the starting color is at the start of each letter (doesn't affect 0.48.5-1 pdf exports because text is imported back in one piece, gradient_0485_text_opaque.pdf gradient_0485_text_opaque.svg)
    • Second, some displacement of the gradient based on the position of the text. See extra example file below.
    • Third (only affects some gradients with transparency), transparency gradients are displaced by unknown value? occurs with drawing-1.pdf but not example files below (pdf import splits a gradient with transparency into an opaque and a transparent (mask) gradient, see inbox#3281 (comment 380108898) for more details)

What should have happened?

Gradient should look like in the pdf (or the poppler import), where the color changes from letter to letter.

image

SVG used to show where gradient should be. This is useful as more complex gradients may be visibly affects by these changes.

Sample attachments:

Version Info:

  • Inkscape 1.1-dev (838ae0f2, 2020-07-14, custom) Linux Mint 19.1
  • Inkscape 0.92.5 (6c0c36ef, 2020-05-15)
Edited by Nathan Lee