Bug 393378 - SVG images with text don't render correctly.
Summary: SVG images with text don't render correctly.
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (other bugs)
Version First Reported In: 18.04.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-21 20:50 UTC by Matthew Trescott
Modified: 2018-04-22 03:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
SVG image that triggers the problem (14.72 KB, image/svg+xml)
2018-04-22 02:41 UTC, Matthew Trescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Trescott 2018-04-21 20:50:53 UTC
Steps to reproduce:

1. Make a non-square SVG image in inkscape and add some text. Save the drawing.
2. Enable thumbnails in Dolphin. The image will have a black box in part of it and the text will not be rendered.
Comment 1 Nate Graham 2018-04-21 21:45:14 UTC
Can you attach one such image?
Comment 2 Matthew Trescott 2018-04-22 02:41:03 UTC
Created attachment 112160 [details]
SVG image that triggers the problem

I suspect this may be due to Inkscape not being fully standards-compliant with SVG. Firefox and Chrome also do not render the text at all.
Comment 3 Nate Graham 2018-04-22 02:43:08 UTC
Yep, sounds like a bug in Inkscape then. Please report it to them! It's vastly preferable to improve standards-compliance than it is to work around it with hacks in individual apps.
Comment 4 Matthew Trescott 2018-04-22 03:10:57 UTC
A little research explains that this is a well-known issue in Inkscape:

http://wiki.inkscape.org/wiki/index.php/Frequently_asked_questions#What_about_flowed_text.3F

https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1076758

I'm not sure what the best solution would be. I suppose KIO uses QtSVG. I wonder whether using Inkscape in shell mode to generate thumbnails (if it's installed on the user's computer) would be an option. It's not a very good solution for a rather minor problem though. It's probably not worth dealing with.
Comment 5 Nate Graham 2018-04-22 03:17:09 UTC
(In reply to Matthew Trescott from comment #4)
> A little research explains that this is a well-known issue in Inkscape:
> 
> http://wiki.inkscape.org/wiki/index.php/
> Frequently_asked_questions#What_about_flowed_text.3F
> 
> https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1076758
> 
> I'm not sure what the best solution would be. I suppose KIO uses QtSVG. I
> wonder whether using Inkscape in shell mode to generate thumbnails (if it's
> installed on the user's computer) would be an option. It's not a very good
> solution for a rather minor problem though. It's probably not worth dealing
> with.

That would make Inkscape a dependency for KIO, which we obviously can't do.

The correct solution is probably for Inkscape to make their flowed text implementation SVG 1.1 compatible until SVG 1.2 or 2.0 is released (based on the history, it seems like it could easily be another 10 years or more!)