Bug 393378

Summary: SVG images with text don't render correctly.
Product: [Frameworks and Libraries] kio-extras Reporter: Matthew Trescott <matthewtrescott>
Component: Thumbnails and previewsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 18.04.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: SVG image that triggers the problem

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!)