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 587721 - Aliasing bug in application of transformation matrix
Aliasing bug in application of transformation matrix
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.2.x
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-04 03:23 UTC by D Haley
Modified: 2017-08-30 15:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description D Haley 2009-07-04 03:23:59 UTC
Please describe the problem:
The following SVG file renders incorrectly, where glyphs overlap. 

Adjusting the font-size parameter to 12, and then changing the transformation matrix back to the identity produces the correct result, even though the transformation is mathematically similar, as far as I can tell.

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1179.75118pt" height="687.74173pt" viewBox="0 0 1179.75118 687.74173" enable-background="new 0 0 1179.75118 687.74173"
	version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >

<g font-family="'DejaVu Sans'" font-size="1" kerning="0" font-weight="400" fill="#000000">
			<text transform="matrix(12 0 0 12 929.88438 660.96434)">Frenchtown</text>
		</g>
		
		</svg>






Steps to reproduce:
1. Render the above svg
2. 
3. 


Actual results:
SVG output results in overlapping text

Expected results:
The SVG output should be identical either through application of a transfromation or by specifying the original font-size parameter.

Does this happen every time?
yes

Other information:
Comment 1 Massimo 2016-02-19 19:17:02 UTC
The problem is that here:

https://git.gnome.org/browse/librsvg/tree/rsvg-cairo-draw.c#n425

before calling pango_cairo_show_layout the docs suggest
to call pango_cairo_update_layout.

Sometimes it seems to work because the cairo matrix has 
not been changed after the layout was created.
Comment 2 Federico Mena Quintero 2017-08-30 15:13:09 UTC
Good catch, Massimo!!!  This is what was making transformed text look weird.  I've been annoyed by this for months.

This is fixed in the librsvg-2.40 branch in commit bf717d5c6a521e53cd455f9a19b6761164715d28, and in the master branch in commit c70000117fb6e7dabdb77c1c8cc1067add7da6d9.