View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016823 | Scribus | Graphics / Image Frames | public | 2022-07-06 14:42 | 2024-11-28 15:08 |
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 | ||||
|
|
|
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. |
|
it looks like the issue for libreoffice was because of the doublequotes in the fill value. AMOF it doesnt make any difference for scribus... but here is the SVG without doublequotes in fill value. |
|
> it looks like the issue for libreoffice was because of the doublequotes in the fill value. is this then an upstream Libreoffice issue that should accommodate the doublequote edgecase ? |
|
Nope luzpaz. LibreOffice had an issue with doublequotes and fixed it. Scribus has a more complex issue as described by nitramr and raphael, and i i can't sum it up. |
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 | |
2024-11-26 20:19 | nitramr | Relationship added | related to 0015838 |
2024-11-28 10:57 | JLuc | Note Added: 0051678 | |
2024-11-28 10:57 | JLuc | File Added: Rotulo_nodoublequotes.svg | |
2024-11-28 15:00 | luzpaz | Note Added: 0051683 | |
2024-11-28 15:08 | JLuc | Note Added: 0051685 |