Page MenuHomePhabricator

SVG fails to render properly due to several issues
Open, LowPublic

Description

Author: kelvinsong10

Description:
SVG file

Hi, I have created an SVG (attached and at https://commons.wikimedia.org/wiki/File:Vector_saturn.svg ) which demonstrates four big librsvg bugs very prominently. The file should render correctly in Inkscape.
A correctly rendered PNG can also be found on commons under the name File:Vector saturn (Correct render).png.

The bugs shown are:

1—Failure to render masks

Any masked object will disappear. Clipping works.

2—Failure to render low Gaussian blurs

Any object with a Gaussian blur which has a size of less than 1 pixel at the given display size will disappear. This is especially problematic when objects will show up blurred correctly at full size, but disappear at thumbnail size.

Not dependent on the blur size in Inkscape—for example, in Inkscape, a very small object may have a blur size of 10, but still disappear in librsvg.

3—Failure to render rotated blurred objects

If any blurred object is rotated more than 90° in either direction, it will disappear. This is not dependent on the size of the Gaussian blur.

4—Failure to correctly render blurred objects on the edges

If an object is cropped by the SVG page boundary, the Gaussian blur will be rendered after the crop is applied, creating a discontinuity.

Version: wmf-deployment
Severity: normal

Attached:

Details

Reference
bz44016

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:18 AM
bzimport set Reference to bz44016.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for taking the time to report this and attaching the great testcase.
For future reference, one problem per report is welcome, as this report is unfixable until four different issues are fixed.

(In reply to comment #0)

1—Failure to render masks

Any masked object will disappear. Clipping works.

Maybe related to http://bugzilla.gnome.org/show_bug.cgi?id=603550

2—Failure to render low Gaussian blurs

Covered by bug 42090. Patch in https://bugzilla.gnome.org/show_bug.cgi?id=605875#c9

3—Failure to render rotated blurred objects
4—Failure to correctly render blurred objects on the edges

Menner added a subscriber: Menner.Oct 17 2015, 6:35 AM

Fix included in version 2.40.10 which got released yet. Now need to backport or need to wait for the distribution used on Wikimedia servers to provide that version....

This is common with T44090.

Menner set Security to None.

Fix included in version 2.40.10

For which aspect of this bug exactly (as there are four listed)? All?
Feel free to click "Upstream" in the list of projects and drag the task to the "Merged in upstream" column if you're sure. :)

Oh, I think not but at least partly. Need to try out this, but won't have time until 31. October.

Aklapper updated the task description. (Show Details)Mar 8 2016, 8:06 PM
Aklapper updated the task description. (Show Details)Mar 8 2016, 8:10 PM

That's not fully fixed in 2.40.16: In comparison to https://commons.wikimedia.org/wiki/File:Vector_saturn_%28Correct_render%29.png the re-rendered version still shows the info box on broken rendering and the shadow is missing.

1—Failure to render masks

Any masked object will disappear. Clipping works.

Maybe related to http://bugzilla.gnome.org/show_bug.cgi?id=603550

That upstream task is fixed in librsvg 2.41.0: https://git.gnome.org/browse/librsvg/commit/?id=29eddba37f8bc1d1686f41fa8eded9c1ce003d7d

We'll unfortunately not be able to easily upgrade to 2.41.0 at this point; librsvg started to implement parts of the code in Rust and Debian jessie does not yet provide the Rust toolchain.

the re-rendered version still shows the info box on broken rendering and the shadow is missing.

Using https://upload.wikimedia.org/wikipedia/commons/0/05/Vector_saturn.svg and latest librsvg-2.45.5 locally:

As I have no idea which of the four issues described in the task description still apply, can someone who has more knowledge of SVGs please file specific bug reports (one per issue) at https://gitlab.gnome.org/GNOME/librsvg/issues/ ?

There's no change in rendering between 2.44.10 and 2.50.1. The remaining issues appear to be T193942: fill using radialGradient not rendered and 4—Failure to correctly render blurred objects on the edges. The background extends outside of the SVG boundary, where a blur is applied. rsvg moves the blur inside the boundary.