-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 images often render incorrectly #5240
Comments
This issue would help from being more specific. |
I understand the concern. I've provided a link to an icon set that mostly doesn't work and a minimal program to test the images in it. Unfortunately, I don't know enough about the SVG format to be of more help. I certainly can't identify why these don't work in particular. Perhaps someone else can explain why they don't work. If you plan to keep to support for SVGs partial for the time being (which is how I interpret your remark above), then I would suggest you mention the limitations in the docs, perhaps add a function to determine whether an SVG file is interpretable, or perhaps remove the recommendation to use SVG images from the docs. As I said, right now it's like rolling a dice. Some images work, others don't, and there is no function in Fyne to determine programmatically which will work and which get displayed as mangled garbage. That makes the format almost unusable for some purposes (e.g. for user-provided images). |
There are some fixes on the release branch - would be good to check against |
I have a svg picture also dosen't work. |
The first image you pasted is a PNG image embedded in an SVG file. |
@rasteric I downloaded and run against the develop branch (with file "Artboards_Diversity_Avatars_by_Netguru-05.svg"): Unless you have a specific file that doesn't work and I got lucky then I think this may be resolved in the upcoming release |
thanks! |
Checklist
Describe the bug
The SVG rendering in Fyne is fairly limited. For example, many of the SVGs in this package:
https://dribbble.com/shots/8934409-Diversity-Avatars
are rendered incorrectly. The corresponding PNGs work. I understand it is a very complex file format but if there is a way to bump up the 3rd party dependency responsible for SVG loading and rendering to a better version, it should be done. SVGs are clearly preferred (also in the docs) and superior to PNGs but only when they work. It shouldn't be like rolling a die whether an SVG works or not.
How to reproduce
Screenshots
These are not supposed to look like this (though the second one is kind of entertaining):
Example code
Fyne version
2.5.2
Go compiler version
1.22.0 linux/amd64
Operating system and version
Linux Mint 22 Cinnamon
Additional Information
No response
The text was updated successfully, but these errors were encountered: