wxUiEditor
wxUiEditor copied to clipboard
Investigate possible way to use output from commercial SVG editors
Description:
This issue revolves around the problem that SVG from most editors cannot be displayed correctly, if at all in the nanosvg code that wxWidgets use. It is a major problem for wxUiEditor which has 156 png files, the vast majority of which need to be recreated as SVG files. While that's probably more than most other projects need to deal with, still it's going to affect anyone with toolbars that want to create an image once for all resolutions, rather than creating multiple versions for each resolution, and then still have the image look poorly if the user isn't using an exact match of the resolutions that the images were created for.
nanosvg had the advantage of being easy to add to wxWidgets. However, not only is the support for SVG quite limited, but it is not actively maintained, so there's no hope of it being expanded to support the full ruange of standard SVG files.
While InkScape has the ability to convert monochrome bitmaps, that's not much help for use with colored images. Since nonosvg doesn't correctly display SVGs from the professional designers from Adobe and Affinity, I've been left with InkScape as the most reliable option. By "most reliable" I'm referring to the SVG it produces -- the program itself crashes frequently for me, losing all the work I've done since the last manual save.
I own Affinity Designer, and it does produce SVG files that InkScape can load (though saving them from InkScape still produces a file that nanosvg cannot display correctly). wxUiEditor already parses SVG files in order to remove all the unused content from InkScape generated files (typically reducing the file size by 85%). I'd like to at least look at what Affinity Designer is producing to see if I can tweak it's output to produce something that nanosvg can display correctly.
Github doesn't give any information about forks other than listing the link to it. There are currently 295 forks for nanosvg, and 43 unmerged pull requests in the main repository. It might be useful to create a clone of nanosvg and merge the pull requests into it to see if any of those changes resolves the problem. Most of the forks won't have useful changes, but some of them might be worth looking at. Should these changes plus anything additional that I can resolve from looking at the Affinity Designer output, then I might at least be able to get something that works for wxUiEditor, and if it remains a simple library, then I might be able to make the library available as a standalone repository that other people could use.
nanosvg repository is at https://github.com/memononen/nanosvg -- it uses a zlib license so unlike a GNU license, we could use the code without requiring all the licenses in the repository to be changed.