SVG file only renders background

svg

#1

I’ve got an issue with a particular SVG file (sent by a client), only the background colour renders - seems that the SVG parser does not like it. I can see this in Projucer when previewing the file.

I’ve attached the offending SVG file (.txt extension added so it uploads here).

Settings.svg.txt (4.7 KB)

Any clues as to why it might not be working? Other files in the same batch are fine.
It was exported from Adobe Illustrator.

Thanks


Unable to render attached svg file
#2

the juce parser doesnt lookup for symbol tag at all


#3

you can change your symbol to svg instead but, you have to still make some correction to its placement


#4

Thanks for the tip, I’m fiddling with it now and almost there :+1:

Update: I’ve found Sketch is good for SVG editing, sorted the problem out with that…


#5

could you uplad the svg now ? im currious what has changed


#6

Sure, here ya go

Settings_fixed.svg.txt (8.1 KB)


#7

thats right, it producess much cleaner and compact document. thanks
just wondering, have you edited the svg or juce re-saved with Sketch ?


#8

No this one was not edited by hand in the end. I re-exported after installing https://github.com/BohemianCoding/svgo-compressor which reduced the file size:

Settings_fixed_compressed.svg.txt (6.8 KB)


#9

yeah, this one even producess less amount of nested drawables. you can imagine that every tag instantiate another Drawable in the tree. unnecessary convoluteness, espacially if i want to access those.


#10
  • Comment removed,
    I’ve tried the fixed file :frowning: