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 630112 - tref should use flattened text
tref should use flattened text
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-20 02:57 UTC by Kurosawa Takeshi
Modified: 2011-11-10 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (370 bytes, image/svg+xml)
2010-09-20 02:57 UTC, Kurosawa Takeshi
  Details
Patch (8.55 KB, patch)
2010-09-20 03:05 UTC, Kurosawa Takeshi
none Details | Review
Updated Patch (10.86 KB, patch)
2011-11-10 04:52 UTC, Kurosawa Takeshi
none Details | Review

Description Kurosawa Takeshi 2010-09-20 02:57:00 UTC
Created attachment 170620 [details]
Testcase

We use a dom tree fragment for a tref rendering: if the referenced element has tspan children, those elements affect the rendering (x, y, fill, stroke, font-size, etc.).
But we should use flattened text.

In this case, "world" in the tref is rendered in red instead of green.

<defs>
<text id="text1">Hello, <tspan fill="red">Wolrd!</tspan></text>
</defs>
<text fill="green"><tref xlink:href="#text1"/></text>


New W3C's SVG 1.1 Test suite will include a test of this.
http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObject/text-tref-03-b.html
Comment 1 Kurosawa Takeshi 2010-09-20 03:05:08 UTC
Created attachment 170621 [details] [review]
Patch
Comment 2 Christian Persch 2011-11-09 17:27:14 UTC
Could you update the patch for librsvg master (or 2.24.1, if you prefer)? I'll apply it then.
Comment 3 Kurosawa Takeshi 2011-11-10 04:52:44 UTC
Created attachment 201122 [details] [review]
Updated Patch

In updated patch, I changed the name of the argument (onlytext -> usetextonly)
# There may be better name though...

SVG 1.1 Test Suite now contains two tests related to this bug:
http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/text-tref-02-b.html
http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/text-tref-03-b.html
Comment 4 Christian Persch 2011-11-10 20:58:39 UTC
Thanks! Pushed to git master.