View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016823 | Scribus | Graphics / Image Frames | public | 2022-07-06 14:42 | 2023-12-27 16:12 |
Reporter | rafael.social.user@gmail.com | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 1.5.8 | ||||
Summary | 0016823: Scribus not showing correctly SVG | ||||
Description | I designed a SVG simple file, with stripped lines inside. LibreOffice (Writer and Draw) are not able to show the filled pattern. | ||||
Steps To Reproduce | 1.Insert "Rotulo.svg" in any new Impress or Draw document | ||||
Additional Information | Scribus 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 | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
child of | 0002931 | acknowledged | Metabug: SVG |
|
|
|
Issue is with `fill='url("#rough-1609495203056042")'` being ignored. Imported shape is OK but content is empty |
|
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 ``` |
|
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. |
|
I must add that LibreOffice fixed issue, maybe their patch could take into account to fix in Scribus this issue. Thank you |
|
Hello Rafael, in case that might help, could you provide the url for the LibreOffice commit ? |
|
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). |
|
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. |
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 |