Jump to content
You must now use your email address to sign in [click for more info] ×

SVG Files not displaying correctly


Recommended Posts

Any advice or help for an issue with SVG icons not being imported/displayed properly?

So far I've tried:

  • Right Click ->Open in Affinity
  • Open affinity -> Open file
  • File -> Place
  • Layer ->Ungroup All

Even trying to isolate each layer and move around to see if it's a color issue (white on white) and I only have the white and blue squares to manipulate.

None of the icons in this repository work, but it looks just fine in the Preview thumbnail on mac, and opens/imports just fine in Adobe Illustrator.

Specifically looking at SVG icons here: https://github.com/home-assistant/assets/tree/master/logo

Screen Shot 2022-02-21 at 9.50.53 PM.png

Link to comment
Share on other sites

Hello @benwittbrodt and welcome to the forums.

In this file there is only one square in multiple nested groups.

If you look at the file in a text editor, you notice that the masks are linked and not embedded in the file. 

AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 23H2 (22631.3085)
AMD A10-9600P | dGPU R7 M340 (2 GB)  | 8 GB DDR4 2133 MHz | Windows 10 Home 22H2 (1945.3803) 

Affinity Suite V 2.3.1 & Beta 2.(latest)
Better translations with: https://www.deepl.com/translator  
Need a system wide color picker? Try Microsoft's (New) Power Toys
Need a robust PDF Solution? Have a look at Stirling PDF

There's nothing you get used to faster than working slowly!

Link to comment
Share on other sites

6 minutes ago, Komatös said:

If you look at the file in a text editor, you notice that the masks are linked and not embedded in the file.

That's not correct, everything is embedded in the file. Seems like maybe Affinity has an issue with the nested references (the group references a mask which references a use).

xlink.png.e670de2dc53434d2d7a0288ab87ebaa1.png

Link to comment
Share on other sites

I’ve had a quick look at the logo.svg file in that repo and I have a suspicion that the problem is to do with the mask element not being interpreted correctly by the Affinity software.

In this particular case I can remove most of the SVG code so that only the path that was used as a mask is retained and it opens fine in Designer but that’s not a great workaround – see attached screenshot.

Since the logos were created in Sketch it may be possible to re-open the files in Sketch and export differently but I don’t use that software so I can’t say for sure.

Screenshot 2022-02-22 082054.png

Link to comment
Share on other sites

20 minutes ago, BofG said:

That's not correct, everything is embedded in the file. Seems like maybe Affinity has an issue with the nested references (the group references a mask which references a use).

You are right, I hadn't seen that it was a "variable" when I quickly reviewed the code.

AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 23H2 (22631.3085)
AMD A10-9600P | dGPU R7 M340 (2 GB)  | 8 GB DDR4 2133 MHz | Windows 10 Home 22H2 (1945.3803) 

Affinity Suite V 2.3.1 & Beta 2.(latest)
Better translations with: https://www.deepl.com/translator  
Need a system wide color picker? Try Microsoft's (New) Power Toys
Need a robust PDF Solution? Have a look at Stirling PDF

There's nothing you get used to faster than working slowly!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.