Are there any rules for .svg files?
-
I am trying to create a system.svg file for some new systems on Emulation Station I created. I used "export as svg" from Adobe Photoshop. I can see that the picture is correct on a browser, yet Emulation Station has the picture blank. Are there any rules I have to follow for the svgs? Or, what can I use to produce an svg acceptable from Emulation Station?
-
EmulationStation uses nanosvg [1] to render SVG files. Thus it is limited to the features of SVG which are implemented in nanosvg, maybe its worth to check their issue and PR backlog if a feature is in the pipeline or check the commits for any feature added since 2019 as the current nanosvg version in ES dates back to 2019-08-28.
I used save as Normal SVG or Optimized SVG in Inkscape. Make sure to do not have any Adobe flavors in the SVG.
I worked around to get a glowing effect (which is not supported by nanosvg) by using layers and paths in the SVG. Examine the "1001 Videogames" logo SVG file [2] to get the idea.
[1] https://github.com/memononen/nanosvg
[2] https://retropie.org.uk/forum/topic/29578/es-theme-just-some-logos-for-auto-custom-collections -
@Lolonois Thanks for the answer. If I understand correctly, I should avoid the Photoshop and use Inkscape instead?
-
@Lord-Vek Correct. Adobe is no good when it comes to SVG for ES. Keep in mind too that using SVG files uses more CPU overhead than a straight-up PNG file, so you are better off using PNGs if you can, but there are cases where SVG is more "crisp" and "snappy" looking... Just use SVG files sparingly... And if so, Inkscape is your friend!
-
@cdaters You mean I can use png files also? And the naming, system.png instead of system.svg?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.