Closed hakanai closed 2 months ago
As @Atlands mentioned, indeed, .svg is not supported as is. You can try to convert your svg into xml. Please follow the comment above.
My colleagues told me that actually, .svg is supported for desktop only (without the resources library), not in common. So it's a bug in Compose for Desktop or Skiko.
Reproduced with 1.6.0-dev1357 too.
Yeah, I've never been sure why Android went and made its own XML format instead of supporting SVG more fully. I remember hitting issues with it way back in the past and thought it might have improved by now.
If I were going to do a rewrite, I think I'd go all the way to rendering the cards in native Kotlin. But that's for later, when I have the time for that kind of exercise. I'll probably make a tool that spits out PDF for printing the actual cards while I'm at it.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug If you try to render an SVG which uses the
<use/>
element, the rendering is skipped.Affected platforms Select one of the platforms below:
Versions
To Reproduce
The SVG:
Expected behavior The image should be rendered as in Chrome, IDEA, and other viewers.
Screenshots