Colors lost on svg import

I just tried to open an SVG file in Acorn. All the shapes are there, all right - but all the colors are black, foregrounds and backgrounds (which makes the whole thing rather useless).

If you want to take a look, the image came straight from here.

Is this an Acorn (7.1.2) limitation, or am I somehow holding it wrong?

Thanks
– perry

I’ve also had limited success loading SVG.

I’ve also had them load in as all transparent and all white.

Acorn has a pretty simple SVG parser. Supporting the whole specification is going to be an impossible job, and I try and support as much as I reasonably can.

I’ll take a look at the SVG you’ve posted and see if I can add support for whatever it is that they are doing. It probably won’t happen right away as I try and group these types of fixes up together, but I will absolutely add it to the bug database so it isn’t forgotten.

Thanks, Gus. I know vector graphics isn’t the focus of Acorn, and Pixelmator did the (simple, scale-and-print-multiple-shrunk-copies) job just fine.

I have a suspicion that this SVG was written by some overly complex graphics program and is way overly complicated for what it’s doing (which basically draw colored boxes and write words on them).

Cheers
– perry

The SVG is using style sheets to apply the different colors, where Acorn is expecting them to be inline with the path tags. I’ll need to add support for parsing style sheets for this to work.

Thanks for looking into this. Speaking for myself, this is only a nice-to-have feature.

Cheers
– perry

1 Like

Acorn supports a small subset of the SVG spec. It’s a pretty big specification, but if you can point me to the original SVG file (and not the bitmapped version of it), I can take a look at improving the importer in a future release.

I ran into this issue today. I sidestepped it by brew installing librsvg and then converting before adding to Acorn:

rsvg-convert -h 4096 Joy_Chirstmas2.svg > Joy_Chirstmas2.png

This worked great for my SVG and hopefully it’ll help others who find this post.

Given how well Acorn takes care of me and how much it spoils me, it’d be great to be given these directions when encountering an SVG that contains unsupported attributes or to wrap rsvg-convert for me. For example, I’d be perfectly content with a prompt saying that rsvg-convert needs to be installed (and point me towards it) before being able to bring in SVGs.