[Sugar-devel] Handling of SVG in Sugar/Sugarizer

Lionel Laské lionel.laske at gmail.com
Wed Aug 26 12:12:00 EDT 2020


Le mer. 26 août 2020 à 07:34, James Cameron <quozl at laptop.org> a écrit :

>
> > Hmmm. Are you sure you should not define a <symbol id="myid"> tag in the
> SVG
> > file and reference #myid in the <use> tag?
>
> I don't know, but I don't think so.  There's no HTML used by Sugar in
> the steps to read and render an SVG file.
>
> It's not related to HTML, it's related to the XML tag <use> in SVG.
I think that the <use> tag in SVG should reference a part of another SVG,
not a whole SVG.
It's why you should reference a specific <symbol> id in the targeted SVG
file.
In my sample.

<use xlink:href="icons/new/abcd-icon2.svg#abcd3" />



> I've been unable to make it work.
>
> Command line test case;
>
> cat > test.css <<EOF
> * {
>     width: 100px;
>     height: 100px;
>     --stroke-color: blue;
>     --fill-color: cyan;
> }
> EOF
>
> rsvg-convert --format=png --output=test.png --stylesheet=test.css
> abcd-icon2.svg
>
> Result is PNG of size 55 x 55 pixels, with no stroke or fill colour.
>
> I don't know what to use as a selector.
>
> Or the Rust CSS implementation doesn't handle var.
>
>
Sound like there is an open issue on this in RSVG library:
https://gitlab.gnome.org/GNOME/librsvg/-/issues/459

     Lionel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20200826/8faf8fe3/attachment.htm>


More information about the Sugar-devel mailing list