Jump to content

Recommended Posts

Hi again,

 

as I was importing some of my SVGs, I noticed some slight issues with their appearance in Affinity. So, I did some testing and found out what was causing these issues. I've created a separate file for each bug (14 in total). It should become clear by following the instructions below. If not, just let me know!

 

Disclaimer: Importing the first file will (most likely) make Affinity crash. Please save your work progress before trying!
Instructions:
1. Open the attached files in a web browser
2. Now import them into Affinity (Photo or Designer)
3. Compare both versions closely

 

Cheers!

 

-------------------------------------------

Affinity Designer Version: 1.5.1.43

Affinity Photo Version: 1.5.1.54

Operating System: Windows 10

1_crash_when_colour_capitalised.svg

2_stroke_although_colour_not_set.svg

3_no_fill_when_colour_capitalised.svg

4_incorrect_gradients_when_gradientUnits_objectBoundingBox.svg

5_nested_svgs.svg

6_no_repetitive_gradients.svg

7_stroke_dasharray_wrong_direction_starting_point_array_too_short.svg

8_no_patterns.svg

9_incorrect_skewing.svg

10_no_drop_shadows.svg

11_no_blending.svg

12_close_path_and_moveToEnd(!).svg

13_no_masking.svg

14_no_markers.svg

Share this post


Link to post
Share on other sites

Hi Night4wk,

Firstly thank you very much for your comprehensive list of files and issues - they are most helpful. With that said what we do ask is that we prefer users to create a separate post for each issue, as it allows our team to work faster and more efficiently when going through all reported issues.

I've gone through all of your files and have reported your issues to development, however there are some areas that we simply do not support yet, as that would require separate tools inside Affinity - so some of these have been reported as improvements as opposed to actual bugs. For example we currently have no support for the options such as Blending (11_no_blending) and also Line Markers (14_no_markers.svg).

With that said we will be adding support for Line Markers so I'm sure when that comes in we will also open SVGs that contain these as well.

Thanks again for your comprehensive list of files.

Share this post


Link to post
Share on other sites

Hi Sean P,

 

Thank you for your instantaneous reply!

 

I am privy to the fact that Affinity's tools are not quite up to manage those tasks, yet.

You would still expect that a powerful software - as Affinity surely is - that claims to be able to import said file format is at least capable of displaying it properly. 

I am not demanding the tools to edit these files to a full extent - although admittedly that would be nice. I am just humbly asking for those files to be displayed correctly when imported into Affinity.

 

Moreover, I want to defend my decision to post these bugs as one topic since they are so closely related that it would be very inconvenient and unsatisfactory for me to divide this problem into 14(!) separate threads. Finding the causes of them has already been fairly time-consuming and I wouldn't be inclined to do this if I had to avoid so many obstacles.

 

Thank you for passing the issues on to the devs and keep up the superb work!  :) 

Share this post


Link to post
Share on other sites

Here is another one:

<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
   <rect ry="10" y="20" x="20" height="30" width="60" fill="red" stroke="black" stroke-width="5" />
</svg>

When importing this in Affinity Designer, the rounded corners are missing.

 

When adding both attributes, rx and ry, it works. Like so:

<rect rx="10" ry="10" y="20" x="20" height="30" width="60" fill="red" stroke="black" stroke-width="5" />

However, the spec is clear about what should happen when only ry is given.

 

https://www.w3.org/TR/SVG11/shapes.html#RectElement

 

 

The values used for the x- and y-axis rounded corner radii are determined implicitly if the ‘rx’ or ‘ry’ attributes (or both) are not specified, or are specified but with invalid values. The values are also subject to clamping so that the lengths of the straight segments of the rectangle are never negative. The effective values for ‘rx’ and ‘ry’ are determined by following these steps in order:

  1. Let rx and ry be length values.
  2. If neither ‘rx’ nor ‘ry’ are properly specified, then set both rx and ry to 0. (This will result in square corners.)
  3. Otherwise, if a properly specified value is provided for ‘rx’, but not for ‘ry’, then set both rx and ry to the value of ‘rx’.
  4. Otherwise, if a properly specified value is provided for ‘ry’, but not for ‘rx’, then set both rx and ry to the value of ‘ry’.
  5. Otherwise, both ‘rx’ and ‘ry’ were specified properly. Set rx to the value of ‘rx’ and ry to the value of ‘ry’.
  6. If rx is greater than half of ‘width’, then set rx to half of ‘width’.
  7. If ry is greater than half of ‘height’, then set ry to half of ‘height’.
  8. The effective values of ‘rx’ and ‘ry’ are rx and ry, respectively.

 

I discovered this when I wanted to import some drawings I made with Inkscape in the past, and they were saved like this.

 

 

Share this post


Link to post
Share on other sites

Looking at the developer reports these 4 are addressed in the 1.6 release

  1. the crash for capitalised colours
  2. SVGs with no Stroke style and just a width are opened with a Solid Line Style (2_stroke_although_colour_not_set.svg
  3. SVG predefined colours ignored if capitalised. (3_no_fill_when_colour_capitalised.svg

  4. SVG Gradient incorrectly opened when using gradientUnits="objectBoundingBox" (4_incorrect_gradients_when_gradientUnits_objectBoundingBox.svg


Patrick Connor

Serif (Europe) Ltd.

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

×