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

Embedded SVGs cause scaling in the master SVG


colinkTGC

Recommended Posts

If you embed one SVG inside of another, it looks like the viewBox DPI for the inner SVG sets the DPI for the outer/containing SVG.

Designer 1.8.6, MacOS High Sierra 10.13.6

embedded_same_dpi.svg.  Note how the circles are in the 4 corners

embedded_different_dpi.svg  Note how circles are scaled toward the top left.

The only difference in the two files is the viewBox of inner SVG, which should not change the location of SVG elements in the containing SVG.

embedded_svg.zip

Link to comment
Share on other sites

  • 3 weeks later...

We found a workaround for the issue we reported here:  

If the first embedded SVG has the same DPI as the master/containing DPI, then any other embedded SVG doesn't scale the master.


However, if you embed SVGs of different DPIs, then the DPI of one SVG can affect other, embedded SVGs.

embedded_samev2.svg.  Note how #SQUARES near the top right fill the containing box.

embedded_differentv2.svg  The viewBox #DPI is different, and #SQUARES is not scaled down

 

 

embedded_svg_v2.zip

Link to comment
Share on other sites

  • 3 months later...

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.