Page MenuHomePhabricator

SVG thumbnail generator: relative font-size: smaller/larger not handled (text disappear)
Open, LowestPublic

Description

Text inside <tspan></tspan> svg element does not painting when generating png files.

Demo:
https://commons.wikimedia.org/wiki/File:Voronoi_diagram_with_two_points.svg

See Also:
https://bugzilla.gnome.org/show_bug.cgi?id=748546

Event Timeline

Relli054w created this task.Feb 6 2015, 8:23 PM
Relli054w raised the priority of this task from to Needs Triage.
Relli054w updated the task description. (Show Details)
Relli054w added a subscriber: Relli054w.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 6 2015, 8:23 PM
Aklapper renamed this task from MediaWiki thumbnail generator: svg->png: <tspan> not handled to Thumbnail generator: svg->png: <tspan> not handled.Feb 9 2015, 10:55 AM
Aklapper triaged this task as Lowest priority.
Aklapper set Security to None.
Perhelion renamed this task from Thumbnail generator: svg->png: <tspan> not handled to SVG thumbnail generator: font-size: smaller not handled.Apr 25 2015, 7:46 PM
Perhelion added a subscriber: Perhelion.EditedApr 25 2015, 7:48 PM

I've analysed this file, it seems simply librsvg not support style="font-size: smaller" and font-size="smaller".

Looking at https://bugzilla.gnome.org/page.cgi?id=browse.html&product=librsvg I could not find a dedicated ticket - if this is an upstream issue, do you plan to upstream it?

If I get this correctly, it's not implemented in upstream, see:
https://git.gnome.org/browse/librsvg/tree/rsvg-css.c#n152
https://git.gnome.org/browse/librsvg/tree/rsvg-css.c#n200
https://git.gnome.org/browse/librsvg/tree/rsvg-css.c#n259

Perhelion added a comment.EditedApr 27 2015, 3:03 PM

Looking at https://bugzilla.gnome.org/page.cgi?id=browse.html&product=librsvg I could not find a dedicated ticket - if this is an upstream issue, do you plan to upstream it?

Thats it, thanks for taking a look in the code (so I change the task desc.). And yes I'll do it. (It would be even less noticeable when the text would not entirely disappear.)

Perhelion renamed this task from SVG thumbnail generator: font-size: smaller not handled to SVG thumbnail generator: relative font-size: smaller/larger not handled (text disappear).Apr 27 2015, 6:46 PM
Perhelion updated the task description. (Show Details)
Perhelion added a project: Upstream.
jayvdb moved this task from Backlog to Reported Upstream on the Upstream board.Jul 21 2015, 5:36 AM

For anyone trying to reproduce this; the SVG linked in the task description has been changed to no longer use font-size="smaller", so it renders fine, but the underlying bug in librsvg is not addressed yet.

This got fixed in upstream in librsvg 2.42.3.