-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG is not rendered for SVG Marker symbol #50208
Comments
There is an issue in Qt, I just opened a ticket : https://bugreports.qt.io/browse/QTBUG-106720 I don't know how to workaround this. If possible, don't use svg:symbol and svg:use together, but I fail to see how Inkscape deals with those item and how to prevent this. I close the ticket, it needs a fix in Qt. |
Thanks @troopa81 for looking into and reporting it to Qt 👍 I've got hundreds of these from a third party source. If someone knows a way how to automatically convert |
@pathmapper Actually, it seems that the symbol tag is not part of the SVG tiny subset supported by Qt, and so QGIS. So you have to convert from svg to svg tiny. There is this github project which propose to do the conversion https://github.com/manisandro/svg2svgt Never tested it, hope it helps |
Looks promising, I'll give it a try - thanks for the hint @troopa81. |
Resulting file (not usable): <?xml version="1.0"?>
<!-- Converted with SVG Converter - Version 0.9.6 (Compiled Thu Aug 31
10:01:05 2017) - Copyright (C) 2011 Nokia -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 100 100"
id="svg2" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny"
version="1.0" width="100%" height="100%">
<defs id="defs4"/>
<use id="use13"
transform="matrix(50.583447,0,0,40.21494,47,97.537347)" y="0"
xlink:href="#RsAbstandsflaeche" width="6" x="0" height="6"/>
</svg> But the <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0"
width="100%"
height="100%"
viewBox="-3 -3 100 100"
id="svg2">
<defs
id="defs4">
<style
type="text/css"
id="style6" />
<g
id="RsAbstandsflaeche"
style="overflow:visible">
<path
d="M 0,0 L 0,-2"
id="path9"
style="fill:none;stroke:#000000;stroke-width:0.25" />
<path
d="M 0,-2.5 L 0.5,-1.5 L -0.5,-1.5 L 0,-2.5 z"
id="path11"
style="fill:#000000;stroke:none" />
</g>
</defs>
<use
transform="matrix(50.583447,0,0,40.21494,47,97.537347)"
id="use13"
x="0"
y="0"
width="6"
height="6"
xlink:href="#RsAbstandsflaeche" />
</svg> |
@pathmapper good to know, I was wondering what was the difference between symbol and g |
@kraftto found a better way using the Inkscape CLI for removing the internal links and From kreis-viersen/xplan-reader#2 (comment):
results in <svg
version="1.0"
width="100%"
height="100%"
viewBox="-3 -3 100 100"
id="svg2"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs4">
<style
type="text/css"
id="style6" />
</defs>
<g
id="use13"
transform="matrix(50.583447,0,0,40.21494,47,97.537347)">
<path
d="M 0,0 V -2"
id="path12"
style="fill:none;stroke:#000000;stroke-width:0.25" />
<path
d="m 0,-2.5 0.5,1 h -1 z"
id="path14"
style="fill:#000000;stroke:none" />
</g>
</svg> |
What is the bug or the crash?
SVG is not rendered/displayed for SVG Marker symbol.
Steps to reproduce the issue
Use the following SVG for an SVG Marker symbol -> no preview, nothing visible on the map canvas:
abstandsfl_rs.zip
Versions
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: