snuffleberries Posted February 28, 2020 Share Posted February 28, 2020 Affinity exports use IDs on various items such as gradients. They are defined in a section called <defs>. The IDs are of the form "_Linear1", "_Linear2" etc. The problem is if you try to inline these SVGs into an HTML page the IDs conflict and the final one overrides the previous ones which messes up the images. Inlining SVGs files in HTML is a pretty common use case. There appears to be no value in having meaningful names within the SVG file and they are not controllable by the user from the Affinity programs. If Affinity used UUIDs for the ID values instead of "_Linear1" then this will not be a problem as each ID will be completely unique and not conflict with any other ID in another SVG generated. I wrote a tool to rewrite the SVGs with UUIDs and it fixes the problem for me, however it would be far more convenient if Affinity produced them like this in the first place. Thank you. sfriedberg 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.