After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749415 - [Wikimedia] Incorrect text positioning after path element with scaling.
[Wikimedia] Incorrect text positioning after path element with scaling.
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.36.x
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 756071 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-05-15 09:25 UTC by mik@gmx.org
Modified: 2016-01-06 20:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch fixes Gnome Bugzilla bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied. (2.70 KB, patch)
2015-05-15 10:52 UTC, mik@gmx.org
none Details | Review
This patch fixes Gnome Bugzilla bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied. (2.93 KB, patch)
2015-05-23 12:56 UTC, mik@gmx.org
none Details | Review
Fixes bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied. (40.93 KB, patch)
2016-01-02 08:49 UTC, mik@gmx.org
none Details | Review

Description mik@gmx.org 2015-05-15 09:25:08 UTC
Downstream: https://phabricator.wikimedia.org/T65703

After a path element containing a transform with strong down scaling (x0.2) any text element has incorrect text positioning. This is equal as having a very small font size where kerning is applied and afterward it is upscaled.


Example:

https://commons.wikimedia.org/wiki/File:Ikaros_solar_sail_key_plain.svg
https://upload.wikimedia.org/wikipedia/commons/c/c7/Ikaros_solar_sail_key_plain.svg
Comment 1 mik@gmx.org 2015-05-15 10:52:50 UTC
Created attachment 303415 [details] [review]
This patch fixes Gnome Bugzilla bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied.
Comment 2 mik@gmx.org 2015-05-23 10:37:44 UTC
My patch has unwanted sideeffects. Don't commit it.
Comment 3 mik@gmx.org 2015-05-23 12:56:47 UTC
Created attachment 303852 [details] [review]
This patch fixes Gnome Bugzilla bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied.

I've reworked my patch with slight modifications. Now it renders all icons from Tango Desktop Project similar to librsvg-2.40.9 without any visible differences according to perceptualdiff included in librsvg test directory.

This patch fixes Gnome Bugzilla bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied.

In librsvg hierachical structures introduced by the XML tree are applied by some kind of stack to save informations of a certain level. In the function for rendering path elements the stack is only pushed under certain conditions. It is not easy to figure out why the stack is only used under these conditions. Here it is assumed it is not always done to improve performance since it is not always necessary to use that stack.

This patch removes any conditions and always uses this stack for path elements.
Comment 4 mik@gmx.org 2015-10-15 16:58:27 UTC
*** Bug 756071 has been marked as a duplicate of this bug. ***
Comment 5 mik@gmx.org 2016-01-02 08:49:13 UTC
Created attachment 318150 [details] [review]
Fixes bug #749415 where text is positioned incorrect if before any path element containing a transform with strong downscaling was applied.
Comment 6 mik@gmx.org 2016-01-02 08:51:11 UTC
The last patch also contains a binary png. Bugzilla doesn't show it during review.
Comment 7 Federico Mena Quintero 2016-01-06 20:37:18 UTC
Pushed as cb7fd6b635a519e968ea67ec529651fe774abe26 to master; this should be in 2.40.13.

Thanks for looking into this bug.  It turns out that the logic to decide whether to create an intermediate surface *is* already in rsvg_cairo_push/pop_discrete_layer(), and it didn't need to be (badly) duplicated in rsvg_cairo_render_path().  Those functions bail out early without creating a temporary surface if it is not needed (e.g. if there is no filter or mask).