Fonts are off in rasterized SVG images on wikimedia sites
Closed, ResolvedPublic

Description

Author: avarab

Description:
Images like the one in the url component that are supposed to have the letter(s)
in them fit exactly to the image have those letters overflow the image, this is
probably a problem with the font(s) at Wikimedia sites as I've been been unable
to reproduce this with both rsvg 2.9.5 and 2.12.7 on my local install, rendering
attached.


Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC
URL: http://commons.wikimedia.org/wiki/Image:Rhetorical_question_mark.svg

bzimport added a project: Wikimedia-SVG-rendering.Via ConduitNov 21 2014, 8:53 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz3769.
bzimport created this task.Via LegacyOct 21 2005, 1:35 PM
bzimport added a comment.Via ConduitOct 21 2005, 1:36 PM

avarab wrote:

The image in the URL component rendered on a local install with rsvg 2.12.7

Attached:

ajvol added a comment.Via ConduitDec 29 2005, 1:59 PM

and we have problem with cyrillic letters in rasterized SVG.

This is SVG with latin labels
http://commons.wikimedia.org/wiki/Image:Rhetorical_question_mark.svg

Same figure with Russian translation:
http://ru.wikipedia.org/wiki/Image:Orbita.svg (black boxes)

Moyogo added a comment.Via ConduitJan 12 2006, 8:08 PM

The font rasterizer should have a better default font, and should also be able
to do the Serif vs Sans serif difference between font:
ex: http://fr.wiktionary.org/wiki/Image:Wiki_logo.svg
The text "Wiktionnaire" should be Serif and "/wik.sjɔ.nɛr/" is missing two
characters.

brion added a comment.Via ConduitMar 1 2006, 1:45 AM

No difference after upgrading to 2.14.0.

bzimport added a comment.Via ConduitSep 20 2006, 4:46 PM

shimmin wrote:

See http://en.wikipedia.org/wiki/Image:Vanillin-ex-eugenol.svg

The subscript 3's are rendered huge. This image renders correctly in Inkscape,
or if opened in Mozilla, but the Mediawiki rasterizer is mangling it.

bzimport added a comment.Via ConduitSep 20 2006, 10:06 PM

shimmin wrote:

(In reply to comment #5)

See http://en.wikipedia.org/wiki/Image:Vanillin-ex-eugenol.svg

The subscript 3's are rendered huge. This image renders correctly in Inkscape,
or if opened in Mozilla, but the Mediawiki rasterizer is mangling it.

Diagnosis: font-size="75%" fails to be understood as 75% of the parent's size,
but instead appears to be taken as 75% of the canvas height! I'll fix this
particular image by specifying the font-size in point terms, but the parser
still needs to be fixed.

tstarling added a comment.Via ConduitApr 18 2007, 10:26 PM

The problems of missing letters and the lack of serif fonts appear to be fixed.
The inconsistency in font sizes between rsvg and Inkscape remains. If the
handling of font-size="75%" really is incorrect in rsvg, it needs to be reported
upstream.

Mattflaschen added a comment.Via ConduitDec 3 2007, 12:54 AM

I learned (painfully) that the rasterizer does not properly handle spacing in fonts. Specifically, it seems to treat multiple spaces as a single space in certain cases. The only workaround is to separate the spaced text into separate elements, which is awkward.

bzimport added a comment.Via ConduitJun 15 2008, 4:59 PM

feroflo wrote:

In the same subject, there is a problem with the font "NSimSun" in this file: [http://commons.wikimedia.org/wiki/Image:Euro2008_venues_wu.svg] some Chinese characters had been changed from the file made with Inkscape 0.46.

Nikola_Smolenski added a comment.Via ConduitJun 13 2009, 10:04 PM

*** Bug 19182 has been marked as a duplicate of this bug. ***

Nikola_Smolenski added a comment.Via ConduitJun 13 2009, 10:07 PM

To add another image where this is very pronounced, http://commons.wikimedia.org/wiki/Image:Planetary_transit_sr.svg

The image, if rendered at normal size is rendered perfectly: http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Planetary_transit_sr.svg/800px-Planetary_transit_sr.svg.png - actually the arrows are not rendered but this is a known rsvg bug.

However, if rendered at a reduced size, the text gets strange spaces at random places: http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Planetary_transit_sr.svg/300px-Planetary_transit_sr.svg.png - for example the text at bottom right that reads "Светлосна крива" becomes something like "Св ет лосн а кри".

I don't think this is a rsvg bug b/c on my computer rsvg (2.18.2) renders the image in reduced size just fine, and I don't see how it could be a MediaWiki bug. My guess is that this is caused by bad fonts installed on the servers.

Also very interesting: image history thumbnails. http://upload.wikimedia.org/wikipedia/commons/thumb/archive/5/59/20080129224211!Planetary_transit_sr.svg/120px-Planetary_transit_sr.svg.png is mangled, http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Planetary_transit_sr.svg/120px-Planetary_transit_sr.svg.png is just fine.

brion added a comment.Via ConduitAug 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.

ArielGlenn added a comment.Via ConduitSep 18 2011, 9:28 AM

giving SVG bugs back to the pool.

TheDJ added a comment.Via ConduitDec 4 2011, 10:25 PM

The rethorical question mark issue seems fixed. There are still many other issues with fonts, some exhibit in some of the files reported here, but these effects all seem to have individual reports.

Add Comment