View Issue Details

IDProjectCategoryView StatusLast Update
0016823ScribusGraphics / Image Framespublic2023-12-27 16:12
Reporterrafael.social.user@gmail.com Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.5.8 
Summary0016823: Scribus not showing correctly SVG
DescriptionI designed a SVG simple file, with stripped lines inside. LibreOffice (Writer and Draw) are not able to show the filled pattern.
Steps To Reproduce1.Insert "Rotulo.svg" in any new Impress or Draw document
Additional InformationScribus doesn't show SVG content as it should

Incorrectly displayed in Scribus and LibreOffice
Correctly displayed in any web browser and Inkscape (as you can see inmediately in "attached" file.

I notified it to LibreOffice bug tracker
https://bugs.documentfoundation.org/show_bug.cgi?id=149880
TagsNo tags attached.
PatchNo

Relationships

child of 0002931 acknowledged Metabug: SVG 

Activities

rafael.social.user@gmail.com

2022-07-06 14:42

reporter  

Rotulo.svg (17,885 bytes)   
Rotulo.svg (17,885 bytes)   

JLuc

2022-07-09 12:43

developer   ~0049725

Issue is with `fill='url("#rough-1609495203056042")'` being ignored.
Imported shape is OK but content is empty

luzpaz

2023-12-22 16:04

reporter   ~0050686

Confirmed. The result of importing this SVG currently looks like:

```
Manjaro 23.1.0
Scribus Version 1.5.9.svn
Build ID: C--T-F-C1.15.10-64bit
Built: 13 August 2023
Companion Programs:
Ghostscript: 10.02.1
Libraries:
cairo: 1.15.10
Harfbuzz: 1.7.2
littlecms: 2090
podofo: 0.9.5
poppler: 0.62.0
```
Screenshot_20231222_110318.png (24,628 bytes)   
Screenshot_20231222_110318.png (24,628 bytes)   

nitramr

2023-12-26 19:09

developer   ~0050697

I checked the SVG plugin. Patterns are parsed in void SVGPlug::parsePattern(const QDomElement &b)

Scribus renders all patterns as an image. Especially for the "GIMP" example, the rendered pattern image is 1x1 px, because the pattern width and height is 1 px too. What is missing is the processing of the viewBox attribute.
See here: https://www.w3.org/TR/SVG11/pservers.html#Patterns

If I hard code the pattern size in the SVG plugin I get the result below. The pattern is correct, but it is blurry and the clipping is messed.

rafael.social.user@gmail.com

2023-12-27 11:40

reporter   ~0050698

I must add that LibreOffice fixed issue, maybe their patch could take into account to fix in Scribus this issue.

Thank you

JLuc

2023-12-27 12:30

developer   ~0050699

Hello Rafael, in case that might help, could you provide the url for the LibreOffice commit ?

nitramr

2023-12-27 13:44

developer   ~0050700

I imported the GIMP SVG file in Inkscape and LibreOffice Writer to check how it looks like. Both applications are importing the pattern as vector path. Scribus renders it as image. I think to make a correct fix, we should rethink the rendering / display of the pattern in Scribus. The SVG plugin creates the pattern correctly as PageItem_Polyline, but then it renders it as image to "unify" it for a later usage. Perhaps we should store the vector path information in a ScPattern object and render it at runtime correctly on canvas. In that way, the output renderer can decide how to render the pattern (as image, as vector graphic, as whatever).

It seems like it is a bigger research to check how LibreOffice implemented the import. I just found the SVG pattern parser, but it only reads the data in SVG file. BTW the parser handles all attributes defined by WC3, Scribus missed some.
https://github.com/LibreOffice/core/blob/master/svgio/source/svgreader/svgpatternnode.cxx

Object creation for canvas is somewhere else. I guess LibreOffice implementation doesn't really help us here, because Scribus has a good implementation. It only needs fixes for size calculation of the pattern and perhaps a better way how to import patterns. The clipping issue is not related to patterns, because it doesn't work for solid colors too (at least for the GIMP SVG file).

rafael.social.user@gmail.com

2023-12-27 16:12

reporter   ~0050702

Hi Jluc

I put the LibreOffice bug link to the thread I opened in "Additional information". Simply click that link and you will see how they fixed issue.

nitramr, I'm totally agree with you. Scribus should not convert SVG to bitmap. In fact, I always thought Scribus respect SVG content to let user to rescale and reuse vectorial objects.

Issue History

Date Modified Username Field Change
2022-07-06 14:42 rafael.social.user@gmail.com New Issue
2022-07-06 14:42 rafael.social.user@gmail.com File Added: Rotulo.svg
2022-07-09 12:43 JLuc Note Added: 0049725
2023-12-22 16:04 luzpaz Note Added: 0050686
2023-12-22 16:04 luzpaz File Added: Screenshot_20231222_110318.png
2023-12-22 16:20 JLuc Relationship added child of 0002931
2023-12-26 19:09 nitramr Note Added: 0050697
2023-12-26 19:09 nitramr File Added: Bildschirmfoto vom 2023-12-26 20-03-54.png
2023-12-27 11:40 rafael.social.user@gmail.com Note Added: 0050698
2023-12-27 12:30 JLuc Note Added: 0050699
2023-12-27 13:44 nitramr Note Added: 0050700
2023-12-27 16:12 rafael.social.user@gmail.com Note Added: 0050702