SVG export LinearGradient wrong

Latest version of Lunacy (5.9), exporting SVG with linear gradients doesn’t show well in a couple of parsers. It’s because LinearGradient is using non-percentage units for x1/y1/x2/y2 and offsets, instead it uses 0.0 … 1.0 range.

The spec also says default values in %:

Please use % for this. Thanks! :slight_smile:

1 Like

Kindly bumping this one! :slight_smile:

Sorry for not answering you right away - we needed to check this properly :slight_smile:

It can be so that the issue is not with the percentage units but with the parsers themselves. Can you send us any examples of the SVG that are not exported correctly so we could check them on our end? You can send to

Though it seems like using percentages might be a more versatile solution, so thanks for suggesting this! We’ll create a task and take it to work as soon as possible.

Btw, Lunacy 6.0 is already up on our website with many fixes applied!

The situation here is quite interesting:

I am a part of a team that works on an open-source virtual instrument called Surge, and this synth uses nanosvg, which is unfortunately not actively maintained, and apparently it doesn’t deal with linear gradients well if they don’t use % units. So any SVG that has linear gradients, that I export from Lunacy, won’t work properly since Lunacy doesn’t write the SVG with % units.

Thanks for listening! :slight_smile:

1 Like

Any movement on this topic? Thanks!

Our team is working under implementing this, will be changed in one of the next releases. I cannot name the exact version so far, though we will update you once it’s on the way :slight_smile: