Page MenuHomePhabricator

rsvg: SVG Text font-size rendered incorrectly
Closed, ResolvedPublic

Description

Author: jay

Description:
[[File:Endosymbiosis.svg|Endosymbiosis and development of eukaryotic cells]]

Opera12, Safari5.1, Firefox10 each render text as desired
however wikipedia png version has miniscule font-size

possibly related bug: 17187
https://bugzilla.wikimedia.org/show_bug.cgi?id=17187


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/File:Endosymbiosis.svg

Details

Reference
bz34792

Event Timeline

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

jay wrote:

marking as regression,

cannot imagine this would not have been picked up in the past?

jay wrote:

this bug was 'automagically' moved to SVG rendering, but SVG rendering is explicitly not the issue.
moved back to images, as is PNG issue

(In reply to comment #2)

this bug was 'automagically' moved to SVG rendering, but SVG rendering is
explicitly not the issue.
moved back to images, as is PNG issue

Moving back to SVG rendering. SVG rendering is for issues turning SVG images into PNG's, which is what you're reporting (Its separate from normal image issues, because its not handled by MediaWiki, but by a program called rsvg).

Its unclear if code-update-regression keyword is appropriate, since that's more for MediaWiki regressions, where svg->png conversion is handled by a third party program (Note, as far as I am aware, rsvg was last updated on jan 24).

I don't have the issue with rsvg-view version 2.34.1

(In reply to comment #1)

marking as regression,

cannot imagine this would not have been picked up in the past?

If this is regression, then wouldn't action=purge change the font rendering on existing SVG images? I tried some, but they didn't render differently. Trying to re-upload some others.

saibotrash wrote:

why should this bug be a regression? was the rendering of this file correct in the past? Probably not since it was uploaded 2012-02-29. It is well known that the rsvg renders different from browsers (like Firefox, ...).

A help may be http://commons.wikimedia.org/wiki/Commons:SVG_Check to check before upload. It also can give you hints what is wrong with your file. I have tried with your file: it renders similar to FF's rendering and reports no errors.

A check with gThumb on my PC shows the exact rendering like Wikimedia Commons (I observed this in the past - it probably also uses rsvg).

Also if I open the svg with inkscape it shows small fonts (although a bit different rendering).

I had checked with http://validator.w3.org - it reports an invalid svg.

So, all in all, I doubt that is a "bug" which is not known. A first step is to supply valid SVG code. ;-)
linearGradient id="chloroplast_green" x="0" should be:
linearGradient id="chloroplast_green" x1="0"

I guess the font sizing is not working properly since you define the sizes in "em" instead of pixels but I cannot find a definition how large one "em" should be. All other measurements seem to be defined in pixels. That doesn't look healthy.

I forgot to remove the code-update-regression keyword.

This is indeed not a regression since it is a bug in the SVG rasterizer we are using (librsvg from the Gnome project). So the bug is really an upstream issue which have been fixed, and now we need to deploy a new version of RSVG.

So that is an issue for the operation team.

Wikimedia imagescalers have been upgraded to Precise which brings librsvg2 to 2.36. The test file https://commons.wikimedia.org/wiki/File:Endosymbiosis.svg now correctly render (although previously generated thumbs need to be purged).

Example as of today:

Correct rendering:
https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Endosymbiosis.svg/799px-Endosymbiosis.svg.png

Incorrect rendering (cached, need to be purged):
https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Endosymbiosis.svg/800px-Endosymbiosis.svg.png