Closed intrepidclass closed 9 years ago
I've done a lot of reading on SVG's use of the style
attribute. I think the core problem is that SVG doesn't support width
/height
in style
.
Why does it seem to work? I think because browsers have learned to be permissive, but it doesn't seem to be part of the official spec for SVG, and thus Batik (which attempts to be compliant) doesn't recognize it.
Here's my evidence:
width
nor height
.I'm going to close this for now and open an issue on https://github.com/Templarian/MaterialDesign/ since it sounds like they might not want to be using style either.
If there is evidence that can be found that width
and height
should be supported, then I'll consider re-opening this issue.
As an aside, the file you should be using from http://materialdesignicons.com/ is NOT the web version. You should be downloading "SVG compressed", I believe. It will give you the proper SVGs.
Using the victor sample project, and changing just the way the dimensions are specified in ic_laptop.svg from
to
results in a 3 by 3 png in the generated xxhdpi folder, containing only a shadowy gradient. (same result when using pt instead of px)
That is somewhat unfortunate, since the http://materialdesignicons.com/ tool specifies the dimensions that way.
@dlew suspects the Batik rasterizer version just needs to get upgraded to solve this issue.