tibold / svg-explorer-extension

Extension module for Windows Explorer to render SVG thumbnails, so that you can have an overview of your SVG files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<use> tags are not rendered when they are before their referenced elements

geekley opened this issue · comments

Simple example:

<svg
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   >
    <use
       x="120"
       y="0"
       xlink:href="#shape"
       />
    <g id="shape">
        <rect x="50" y="50" width="50" height="50" />
        <circle cx="50" cy="50" r="50" />
    </g>
</svg>

This should render as 2 shapes (like the browser and Inkscape do), but the thumbnail preview only shows 1 shape, not recognizing the <use> tag.
When the use tag is after the referenced element, both shapes are shown correctly.

I didn't test it, but it is possible that other tags with the href or xlink:href attribute also have this incorrect behavior.

If this bug is in an external library (Qt?) then where should the issue be submitted?

commented

Definitely a bug. I experienced the same problem.

Tried to file a bug: https://bugreports.qt.io/browse/QTBUG-69694

@ionum could you check #4 and #5 too, if possible?
I don't know if #4 is a bug inside Qt or in how the library is used. #5 is probably a bug in Qt happens because Qt implements SVG Tiny spec.
Please and thank you 😄.

commented

QT-bug is fixed (merge into 5.1 tree). See https://bugreports.qt.io/browse/QTBUG-69694

@maphew: Do you link againts qt 5.1?

@ionum I imported from CodePlex because I use the extension and I didn't want to lose access to it when CodePlex shut down in 2017. That may have been a mistake since everyone assumes I maintain the repo as well, naturally enough! See #7

As the binaries on Appveyor already use a newer QT version - is there anything else to do here than creating an official release from it (after fixing #36 the 64bit installer) to "fix" this bug from this repo's side?

If the svg example in OP renders properly post #36 then yes I would call this issue closed.

#45 fixes this issue.

image