Jump to content
spacious

Fonts don't display when importing .svg

Recommended Posts

When I try to place an svg file ('HKA.svg', attached) in my Affinity Designer project, which I created using the svg() function in R, Designer seems not to display any of the text at all (see 'designer_screenshot.png'). If I open the same file with, say, GIMP, then the text displays fine (see 'GIMP_screenshot.png').

 

I'm running OSX Yosemite and R is generating .svg files using the cairo graphics library.

 

I'm a bit of a novice with .svg files, but if I open the .svg file with a text editor I can't find any <font> elements,

which I thought might have something to do with the problem... along the lines of Designer not being able to find

the font definition file. But this was probably rather naive of me.

 

Is this a bug, or am I doing something silly?

 

Thanks a lot in advance,

 

Ben

post-10546-0-52868900-1429798949_thumb.png

post-10546-0-48060400-1429798951_thumb.png

HKA.svg

Share this post


Link to post
Share on other sites

Hi Ben,

 

Thanks for attaching a file - that helped a lot :) It seems that the program you're using has created paths, not text items (which is completely fine) but it has also wrapped them in a 'symbol' tag that I've not seen before. Now that I have your file I can alter the svg import code to resolve this issue - I'm sure it won't take long. Sorry about this in the meantime :(

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Hi Ben,

I ran into the same problem while taking Affinity Designer for a test drive.

Try to save the files from R as PDF. Affinity Designer imports those without any problems and the text shows up as expected.

 

Cheers,

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

 

Thanks for your reply. I have already experimented with PDFs, but I can't seem to make the background transparent (which is what I want from the .svg file) using either R's pdf() or cairo_pdf() functions... hence my perserverence with the .svg format.

 

Ben

Share this post


Link to post
Share on other sites

Hi Matt and Ben,

I just had the change to test the latest Beta and opening SVGs produced by R works fine now.

 

Thanks for the great work.

Tim

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×