Skip to main content
Participating Frequently
May 24, 2022
Answered

Working with icons from illustrator - bounding box and file naming

  • May 24, 2022
  • 1 reply
  • 1718 views

Theres a couple of issues that have been driving me a bit crazy. Would love to know if anyone has a fix.

 

When I make an icon in illustrator, the bounding box is based on the points in the icon. The weight of the stroke might fall outside the bounding box, but that's fine. However, when I copy and paste the icon into XD, the bounding box now fits to the outside of the weight of the path. The result: a 20px square icon with a 2px stroke weight in illustrator becomes a 22px square icon in XD. The fix for this issue is to export the icons from illustrator as SVGs and then import them into XD. Then everything works as it should... However it throws up a separate issue:

 

If I have a bank of icons exported from illustrator with appropriate file names, when I import them into XD the files all appear with the name 'b' instead of the file name. So I'm having to rename them all again inside XD. 

 

Both issues seem bananas to me  - The two programs don't seem to work very well together at all.

Any pointers?

 

Cheers

    This topic has been closed for replies.
    Correct answer Kenneth Kawamoto

    I looked at the SVG code and it has a strange nested nodes structure.

    I saw a similar post in the Illustrator forum recently and the poster said:

    > I was able to solve it by deleting the folder %appdata%\Adobe\Adobe Illustrator 26 Settings\
    It seems that this configuration gets corrupted after a while and badly exports the files.

     

    Worth a try?


    This has been just posted by Anshul_Saini @ Adobe:

    > It seems this issue surfaced in v26.1, and for some users downgrading to Illustrator v26.0.3 or earlier helped resolve the issue. We have already logged a bug with the team, and they are currently working on a fix.

    1 reply

    Community Expert
    May 24, 2022

    > when I import them into XD the files all appear with the name 'b' instead of the file name

    That sounds not right. When you import a SVG the file name should be retained. Can you share an example SVG file...?

    ThomHayesAuthor
    Participating Frequently
    May 24, 2022

    Hi Kenneth

    I've attached one of the files - I really hope it's simply an export option I've not seen somewhere... 

    ThomHayesAuthor
    Participating Frequently
    May 24, 2022

    I've just found that in the SVG export options in Illustrator, if I uncheck 'minify' then the file name does appear in XD, however it is still nested inside 2 folders before you get to the named group (see attached).

     

    The icons all live inside layer one in the Illustrator file - no other folders or groups.