PDF Internal import of text with gradient positions gradient incorrectly
Split off from inbox#2473 (comment 328883445)
Steps to reproduce:
- open ink-text-grad-opac.pdf in Inkscape, internal import, default settings
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.
SVG used to show where gradient should be. This is useful as more complex gradients may be visibly affects by these changes.
Sample attachments:
- Simplest test case: opaque gradient, text minimally displaced: ink-text-grad.pdf ink-text-grad.svg
- Same svg as above, but text is displaced more. If you're aware of the first issue, displays the second issue more clearly. ink-text-grad-displaced.pdf ink-text-grad-displaced.svg
- Like simplest test case, but with a transparent gradient. Transparency is handled well: ink-text-grad-opac.pdf ink-text-grad-opac.svg
- Like above, but transparent gradient is vertical. Transparency is handled well: ink-text-grad-opac-vert.pdf ink-text-grad-opac-vert.svg
- Like simplest test case, but text is rotated/displaced. Nothing special ink-text-grad-complex.pdf ink-text-grad-complex.svg
- File created in 0.48.5-1 on Windows 10. I expected it to import without errors like in inbox#3281 (moved), but that wasn't the case. gradient_0485_text_opaque.pdf gradient_0485_text_opaque.svg)
- Another pdf taken from inbox#2473 (comment 328883445) (ignore the rectangular gradient, reported inbox#3281 (moved)): drawing.pdf
Version Info:
Edited by Nathan Lee
