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

SVG not rendered correctly


msageryd

Recommended Posts

The attached file (adr_6.2.svg) is an optimized SVG (with SVGO). It renders correctly in Safari and Chrome on MacOS Mojave, but Affinity Design does not render it correctly.

The non optimized file (ADR_62._original) works in AD. Something in the optimization is not handled well by AD. The fact that the browsers renders correctly leads me to believe that AD has a bug.

This is how the original SVG looks in AD. Chrome and Safari renders the optimized image like this as well:

image.png.952f95ddc7906d5a0c9904dc51ec534c.png

 

This is how the optimized image it looks in AD:

image.png.5aaa4930857dac748697881bbb4d6026.png

 

The SVGO params:

svgo = new SVGO({

  plugins: [
    {
      cleanupAttrs: true,
    },
    {
      removeDoctype: true,
    },
    {
      removeXMLProcInst: true,
    },
    {
      removeComments: true,
    },
    {
      removeMetadata: true,
    },
    {
      removeTitle: true,
    },
    {
      removeDesc: true,
    },
    {
      removeUselessDefs: true,
    },
    {
      convertTransform: true,
    },
    {
      removeEditorsNSData: true,
    },
    {
      removeEmptyAttrs: true,
    },
    {
      removeHiddenElems: true,
    },
    {
      removeEmptyText: true,
    },
    {
      removeEmptyContainers: true,
    },
    {
      removeViewBox: true,
    },
    {
      cleanUpEnableBackground: true,
    },
    {
      convertStyleToAttrs: false, //do not activate!
    },
    {
      convertColors: true,
    },
    {
      convertPathData: true,
    },
    {
      convertTransform: true,
    },
    {
      removeUnknownsAndDefaults: true,
    },
    {
      removeNonInheritableGroupAttrs: true,
    },
    {
      removeUselessStrokeAndFill: true,
    },
    {
      removeUnusedNS: true,
    },
    {
      cleanupIDs: true,
    },
    {
      cleanupNumericValues: true,
    },
    {
      moveElemsAttrsToGroup: true,
    },
    {
      moveGroupAttrsToElems: true,
    },
    {
      collapseGroups: true,
    },
    {
      removeRasterImages: true,
    },
    {
      mergePaths: true,
    },
    {
      convertShapeToPath: false,
    },
    {
      sortAttrs: true,
    },
    {
      transformsWithOnePath: true,
    },
    {
      removeDimensions: true,
    },
  ],
});

 

adr_6.2.svg

ADR_6.2_original.svg

Link to comment
Share on other sites

  • 3 weeks later...
  • 6 months later...
  • Staff

We have made fixes/improvements to this area (Curves inside an optimised SVG open incorrectly) of the program in the latest release.

The fixes and how to update are described in these forum posts.

We would appreciate you checking that this issue has now been resolved for you,

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

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.