Page MenuHomePhabricator

[SVG Rendering] Worsening of font rendering quality
Closed, ResolvedPublic

Description

Author: alexander_berlin

Description:
Recently I noticed that most of the fonts in SVG images are messy. I assume it's related to the recent replacement of the renderer software.

Examples:

.. these SVG's looked good a few weeks ago.

See also: T36947 (Incorrect text positioning in SVG rasterization (scale/transform))


Version: unspecified
Severity: minor

Details

Reference
bz16368

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:29 PM
bzimport set Reference to bz16368.
bzimport added a subscriber: Unknown Object (MLST).
brion added a comment.Aug 3 2009, 4:53 PM

Assigning SVG bugs to Ariel -- need a cleanup pass to see what's fixed up by a librsvg upgrade, what can be resolved with fixes to our font configuration, what can be fixed on our end, and what still needs to be pushed upstream.

matthias wrote:

Especially chemical formulas are affected by the bad font rendering. When saving chemical formulas as text without text converted to path, there are severe rendering issues, especially when using scaled down versions. The font is sometimes too big, other times too small, but usually pixelish.

http://commons.wikimedia.org/wiki/Commons:Graphics_village_pump#bad_font_rendering_in_chemical_SVGs

I assume this was fixed in the meantime; the example images look good now.

alexander_berlin wrote:

(In reply to comment #3)

I assume this was fixed in the meantime; the example images look good now.

???? No, the problem still is the same. Please directly compare a SVG and a PNG of the same image side by side. Like:
http://commons.wikimedia.org/wiki/File:Jade-weser-muendung_map_de.svg
http://commons.wikimedia.org/wiki/File:Jade-weser-muendung_map_de.png

The labels in the SVG are pixelated (particularly when downscaled), single letters are placed not accurate (jumping up and down, left and right). By now, it is absolutely not possible to have maps as SVG at Commons - because the labels are too ugly and unreadable.

For me (as a map maker), SVG usage at Commons is dead. The results are way to far from satisfying (there are a lot of other problems as well with SVG).

Created attachment 6925
Comparison of rendering by User and by MediaWiki

PNG rendering of the SVG test case by MediaWiki, compared to the reference PNG provided in comment #4.

Could you please describe what's wrong?

Attached:

alexander_berlin wrote:

Could you please describe what's wrong?

Spaces between letters are not equal. Letters are jumpimg up and down the baseline. eg look at "Jadebusen". At "Lang-Lütjensand" t and j interfere with each other.

Hence labels look somewhat messy at downscaled images.

Please note, that it looked well at the time I've uploaded the SVG. So something must have changed in the meantime, what causes these effects.

Thanks. There are indeed some minor offsets for renderings of this large SVG at small sizes.

TheDJ added a comment.Nov 4 2010, 3:48 AM

Then that is most likely an rsvg bug. there are dozens of it. :(

Looks really ok v1.17

(In reply to comment #9)

Looks really ok v1.17

v 1.17 where? On Wikimedia, on your own wiki? SVG rendering isn't handled by MediaWiki, so the version of mediawiki doesn't really have any affect. Its the version of the program mediawiki uses to turn svgs -> pngs that matters, which is independent of the version of mediawiki.

giving svg bugs back to the pool.

(In reply to comment #10)

(In reply to comment #9)

Looks really ok v1.17

v 1.17 where? On Wikimedia, on your own wiki? SVG rendering isn't handled by
MediaWiki, so the version of mediawiki doesn't really have any affect. Its the
version of the program mediawiki uses to turn svgs -> pngs that matters, which
is independent of the version of mediawiki.

It sounds implausible, see also: Bug:31122

It sounds implausible, see also: Bug:31122

As implausible as that sounds, I can ensure you the version number of the program _NOT_ used to turn svgs into pngs does not affect how well the svgs are converted.

+keyword testme.

Is this still an issue?

Created attachment 16676
another SVG rendering comparison (Liberation Sans)

Attached:

Our SVG font rendering still sucks. Attached a comparison of an SVG using the Liberation Sans font, which I know we have on the scaler servers (https://gerrit.wikimedia.org/r/#/c/126249/) and which I also have installed locally. The image on the left is my local rendering and the image on the right is the Commons thumbnail (recently generated). The Commons rendering is so bad it doesn't even look like the same font. The kerning is totally random, the letters are running into each other and the words look vertically squished. If rsvg can't render fonts correctly, is there anything else we could use?

Perhelion added a comment.EditedDec 22 2015, 1:48 PM

Workaround: Use a font-size between 70 and 90px. It seems nearly all worsening do not appear anymore in scaling.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 22 2015, 1:48 PM
Perhelion updated the task description. (Show Details)Dec 22 2015, 1:55 PM
Perhelion set Security to None.

The SVG in the description seems to be rendering fine. Unfortunately, there is no screen-shot so I have no idea if the reporter's problem has actually been fixed or not.

As this ticket does not seem to have a specific description of a bug, I recommend closing as Resolved or Invalid.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptAug 10 2016, 9:15 PM
Aklapper closed this task as Resolved.Aug 22 2016, 8:24 AM
Aklapper claimed this task.

No actual vs expected outcome for test case (as described in T18368#2541732) hence closing this task.