twise Posted August 28, 2021 Share Posted August 28, 2021 Hi, There appears to be a bug in the SVG import process, specifically when using clones and applying scaling & translations. I noticed this following a change in how Matplotlib in Python exports SVGs - since this change, text characters end up on top of one another rather than being spaced apart when imported into AD. There are no problems importing into Inkscape, Chrome, etc. Here is a minimal example, with a lowercase L followed by a dash (the SVG file to recreate this is attached). This is how it (correctly) appears when imported into Inkscape. And this is how it appears imported into AD. The problem seems to lie in the application of x/y positioning to clones when importing into AD. When the paths themselves are scaled (in this example by 0.015625), the X offset is applied before the scaling rather than after, meaning the X offset of the characters is 0.015625 times what it should be. Everything is fine if the "x" value is replaced by an equivalent translation. # This doesn't work <use x="27.783203" xlink:href="#DejaVuSans-45"/> # This works, replacing the "x" argument with a translation <use transform="translate(27.783203 0)" xlink:href="#DejaVuSans-45"/> More discussion related to this issue can be found in this thread. Thanks! Quote Link to comment Share on other sites More sharing options...
Staff Sean P Posted September 1, 2021 Staff Share Posted September 1, 2021 Hi twise, Thank you very much for letting us know. I'll get this passed along to development to be investigated. Quote Link to comment Share on other sites More sharing options...
amphioxus Posted June 21, 2022 Share Posted June 21, 2022 (edited) Are there any updates on this issue? I have run into the same problem with figures created in current Matplotlib versions. SVGs are displayed fine in all other software I tested (Mac Finder Preview, Firefox, Safari. Ubuntu Inkscape, ImageViewer), but are mangled in Affinity Designer 1.10.5 (and in Affinity Publisher too). Edit: I didn't realize the original post was in a Windows-bug section. I should have looked for the MacOS bug section instead before posting. Anyways, this problem seems to be OS-independent. Edited June 21, 2022 by amphioxus Added note that this in not just Windows bug 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.