Bug 88278 (SVG-Import)

Summary: [META] SVG import image filter (all modules)
Product: LibreOffice Reporter: V Stuart Foote <vsfoote>
Component: filters and storageAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: Armin.Le.Grand, dtardon, philipz85, thomas.lendo, vsfoote, xiscofauli
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=113333
https://bugs.documentfoundation.org/show_bug.cgi?id=88277
https://bugs.documentfoundation.org/show_bug.cgi?id=111450
Whiteboard: filter:svg
Crash report or crash signature: Regression By:
Bug Depends on: 48067, 62254, 64464, 79153, 79721, 84494, 87450, 89623, 89851, 91614, 93258, 93522, 94344, 95145, 97537, 97585, 97651, 97653, 97657, 97660, 97691, 97693, 97778, 97984, 98451, 98994, 101703, 108562, 108620, 108764, 113906, 114094, 114095, 114838, 114941, 118792, 121916, 129324, 131085, 131523, 133020, 133549, 135881, 147052, 148167, 151618, 152123, 152997, 153158, 155211, 155530, 156066, 156103, 156235, 158295, 158639, 160311, 160502, 160688, 160794, 160803, 161004, 40941, 48062, 48068, 53595, 61899, 64075, 64457, 64459, 64461, 64462, 78232, 79856, 81561, 82214, 83426, 86938, 87309, 87440, 87921, 87969, 88365, 88383, 88925, 89943, 92032, 92991, 93583, 93987, 94139, 94765, 95400, 96176, 96880, 97332, 97531, 97534, 97536, 97538, 97539, 97541, 97542, 97543, 97566, 97576, 97581, 97582, 97583, 97659, 97663, 97689, 97690, 97710, 97717, 97752, 97936, 97980, 99115, 99562, 99628, 100135, 100198, 101083, 101682, 103154, 103888, 105384, 106100, 106201, 107392, 109256, 112572, 113501, 114451, 115017, 116205, 116333, 116589, 117920, 118087, 118428, 120592, 122712, 123198, 123528, 123852, 123926, 124848, 126330, 127026, 127376, 128088, 129352, 129356, 130126, 130887, 132246, 134070, 134716, 136491, 136492, 138123, 139579, 140621, 143001, 143991, 145896, 146682, 148191, 149545, 149673, 150124, 151103, 151118, 151674, 153025, 155651, 155733, 155735, 155814, 155819, 155830, 155932, 156016, 156038, 156068, 156201, 156236, 156251, 156271, 156283, 156569, 156577, 156579, 156616, 156777, 156834, 156837, 157103, 157113, 158445, 158931, 159566, 159594, 159601, 159660, 159661, 159947, 159968, 160171, 160373, 160386, 160593, 160594, 160702, 160704, 160717, 160721, 160726, 160782, 160832    
Bug Blocks: 108437, 147248    

Description V Stuart Foote 2015-01-10 19:20:01 UTC
Meta issue to track inserting SVG image filter issues in all modules
Comment 1 V Stuart Foote 2015-01-10 20:40:35 UTC
bug 64705 -- the inline css of the SVG is not fully rendered when inserted
bug 87309 -- "currentColor" attribute not handled by filter
bug 87921 -- transform of embedded PNG image is being inverted on insert (not for the open filter).
Comment 2 V Stuart Foote 2015-01-10 20:41:59 UTC
s/64705/64075/
Comment 3 V Stuart Foote 2015-01-10 21:10:29 UTC
bug 64457 -- rotated text of Inkscape SVG rendered as individual character paths
bug 64459 -- line weights of Inkscape SVG dashed lines not inserted correctly
bug 64462 -- size of fonts specified in Inkscape SVG
Comment 4 V Stuart Foote 2015-01-10 23:03:02 UTC
bug 87440 -- Inkscape SVG arrow line ends and dot/circle fills
Comment 5 V Stuart Foote 2015-04-05 20:38:20 UTC
Folks,

When adding issues to this meta tracker, please add a note and any comments regards the issue. Also, please set the Whiteboard entry filter:svgInsert on the issue being added.

Thanks!
Comment 6 Robinson Tryon (qubit) 2015-12-09 18:51:35 UTC
Migrating Whiteboard tags to Keywords: (filter:svgInsert)
Comment 7 Buovjaga 2016-01-04 14:41:14 UTC
bug 96880 is about performance, but adding per discussion with jmux
Comment 8 Yousuf Philips (jay) (retired) 2016-02-08 15:51:41 UTC
Currently testing all the sample SVGs found in this w3.org folder

 https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ 

and filling bug reports for problems i notice and documenting the results of each tested file here

https://docs.google.com/spreadsheets/d/1ACX6w2SoJ5VXMQgG7mCZGx_iRHasr4c0y1Z5qzB2tTY/edit?usp=sharing

Here is the list of bug reports i've opened so far related to this testing.

97531 - INSERT: Gradients in SVG shown as solid color
97534 - INSERT: SVG smoothness of lines change on zoom level and refresh
97536 - INSERT: SVG shapes have light outlines
97537 - INSERT: SVG text color and style incorrect
97538 - INSERT: SVG image cropped
97539 - INSERT: SVG clippath not fully supported
97541 - INSERT: Part of SVG shape not rendered
97542 - INSERT: SVG text fill color not used
97543 - INSERT: SVG <line> and <polygon> attributes ignored
97566 - INSERT: SVG redraw at different zoom/resize levels crops content
97576 - INSERT: SVG font glyphs ignored
97581 - INSERT: unknown lines appearing in SVG shape
97582 - INSERT: Rims of SVG car missing
97583 - INSERT: SVG doesnt support blur
97585 - INSERT: SVG background not shown
Comment 9 Yousuf Philips (jay) (retired) 2016-02-08 22:04:55 UTC
Just for people's reference, LibreOffice had a different SVG implementation between 3.3 and 3.6 and this was replaced by the current SVG implementation which was written by Armin and added in 4.0.

https://blogs.apache.org/OOo/entry/good_news_libreoffice_is_integrating

So for those who are doing regression testing, it is good to test 4.0 against master. I also test 4.3 as an in between version if the need arises.
Comment 10 Heiko Tietze 2016-05-17 13:19:34 UTC
92991: Pattern is not respected

For the definition see https://www.w3.org/TR/SVG/pservers.html#Patterns
Comment 11 Heiko Tietze 2016-05-17 14:34:27 UTC
88383: Clipping
95400, 95401: Font properties are not respected
64464: Gradient issue (either a gradient with two stops only when opened or simulated by multiple lines after inserting)
Comment 12 V Stuart Foote 2017-01-03 16:20:49 UTC
bug 95276 - SVG-image text layout bug (pixels cut off from text)
Comment 13 Xisco Faulí 2018-06-20 17:08:27 UTC
Thanks to Armin, since https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ca7be09834a26fbd1c371deabd7a58111092676, we use the same filter for both import and insert, thus, this meta bug will be used for both cases now
Comment 14 mcbob 2019-01-15 13:50:11 UTC
5.2 Works correctly for me.  The problem was introduced somewhere in 6.x

Reading Armin's comment, a better description of the problem might be in stead of the expected behavior of loading the .svg file for editing, an .svg object is embedded in a new drawing preventing any edits.
Comment 15 Zak McKracken 2019-01-21 21:11:46 UTC
Given the large number of outstanding issues on SVGs -- what is the chance that SVGs will at some point be fully supported, and would it not be a better solution to do as OpenOffice has done and treat SVGs as a (passive) blob like other images, and use librsvg to render, print and convert them?

After all, code to do all these things already exists in other open source applications, and at least to me, this looks as if a few people were making a lot of work for themselves to replicate that functionality...

Barring that, I would request that until such time as this import filter works 100%, there be a way to use librsvg to embed them passively instead.