Last modified: 2014-06-02 08:49:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7792, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5792 - rsvg does not render baseline-shift correctly
rsvg does not render baseline-shift correctly
Status: NEW
Product: Wikimedia
Classification: Unclassified
SVG rendering (Other open bugs)
unspecified
All All
: Normal normal with 18 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: upstream
Depends on:
Blocks: svg
  Show dependency treegraph
 
Reported: 2006-05-02 14:03 UTC by Bartosz Marcin Kojak
Modified: 2014-06-02 08:49 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bartosz Marcin Kojak 2006-05-02 14:03:24 UTC
I think that MediaWiki ignore „baseline-shift” in SVG files. Example: http://commons.wikimedia.org/wiki/Image:
Fluoxetine_.svg. „3” should be as subscript. Code:

<text fill="#000" font-family="Arial" font-size="30pt" textLength="55.7" x="288.3" y="453.838348083">CF<tspan 
baseline-shift="sub" font-size="75%">3</tspan></text>

Also, MW interpreted „font-size="75%"” as 75% page height or I don't know what.
Comment 1 Thomas 2007-02-26 10:21:51 UTC
There are multiple images to demonstrate, that baseline-commands are not
rendered correctly. There is also a category on commons that should contain
these faulty images. (See [[:commons:Category:Pictures showing a librsvg bug]]

Example-Pictures showing that bug:
* [[:commons:Image:2 methylnaphthalene.svg]]
* [[:commons:Image:Radical benzil.svg]]
* [[:commons:Image:Eulan.svg]]
* [[:commons:Image:Fenitrothion.svg]]
* [[:commons:Image:Diazepam-BUGTRACKINGVERSION.svg]]
* [[:commons:Image:Aspartame.svg]]

As a result of this bug, many characters are converted into paths. This on the
one hand increases file size and on the other hand makes it different to later
modify that files.
Comment 2 Tim Starling 2007-03-01 21:04:35 UTC
Upstream feature request: http://bugzilla.gnome.org/show_bug.cgi?id=340047
Comment 3 arun 2007-03-31 21:34:42 UTC
Even kerning/letter spacing is ignored. see [[:commons:Image:New Delhi 
map.svg]], the street names had different kerning but everything is lost in 
the png.
Comment 4 Brion Vibber 2009-08-03 16:53:44 UTC
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.
Comment 5 PRO 2011-07-08 14:55:19 UTC
For the example, [[Bugzilla:13494]] apply too.
Comment 6 Rainald Koch 2011-07-17 14:58:21 UTC
[[:commons:Image:FMCW_Doppler_radar.svg#filehistory]] see 1st version (3rd is identical, 2nd is the workaround)

1. The baseline shift of delta-t is ignored.

2. Indices nested in <text ... as <tspan style="baseline-shift:sub;font-size:0.85em"... are not rendered at all. That may be an existing other bug, which I missed, however, in the tracking [[Bugzilla:8901]].
Comment 7 Rainald Koch 2011-07-17 15:21:23 UTC
The tspan issue is #23574, tracked in #8901.
Comment 8 Ariel T. Glenn 2011-09-18 09:12:40 UTC
giving SVG bugs back to the pool.
Comment 9 Antoine "hashar" Musso (WMF) 2012-02-29 20:07:05 UTC
Migrating bug to Wikimedia > SVG rendering

Still not fixed upstream.
Comment 10 ralf 2012-03-12 16:30:07 UTC
I propose to work around this until all bugs have been resolved by using a different SVG renderer on Commons, maybe only for those problematic SVGs? Maybe let the uploader decide which engine? One that would work and is OSS: inkview as part of the inkscape package.
Comment 11 Antoine "hashar" Musso (WMF) 2012-03-12 20:38:06 UTC
(In reply to comment #10)
> I propose to work around this until all bugs have been resolved by using a
> different SVG renderer on Commons, maybe only for those problematic SVGs? Maybe
> let the uploader decide which engine? One that would work and is OSS: inkview
> as part of the inkscape package.

That should be another bug report, or better, a discussion on the wikitech-l mailing list :-]
Comment 12 Derk-Jan Hartman 2012-10-26 09:09:32 UTC
These are now all fixed (after a purge)
Comment 13 PRO 2012-10-26 13:11:14 UTC
(In reply to comment #12)
> These are now all fixed (after a purge)

Please do not close bugs with images that are fixed with a workaround!? Sorry I don`t see anything fixed. 

Most given examples have NOT a baseline-shift, but this:
* [[:File:Diazepam-BUGTRACKINGVERSION.svg]]
* https://upload.wikimedia.org/wikipedia/commons/thumb/archive/8/84/20070517212855!Radical_benzil.svg/240px-Radical_benzil.svg.png
Comment 14 PRO 2012-10-26 13:13:30 UTC
Not forgot that Firefox also don't support this: https://bugzilla.mozilla.org/show_bug.cgi?id=308338
Comment 15 Derk-Jan Hartman 2012-10-26 13:14:56 UTC
Ah didn't notice the baseline-shift. Was distracted by the comments about tspan's in the later comments (which IS fixed).
Comment 16 PRO 2012-10-26 13:21:54 UTC
(In reply to comment #15)
Upstream as:
https://bugzilla.gnome.org/show_bug.cgi?id=340047
Comment 17 Spinningspark 2014-05-29 10:21:24 UTC
Just to emphasise (since this bug has twice been closed) that this bug has not been fixed.  Here is an example with a permalink from the history in Wikipedia;

https://upload.wikimedia.org/wikipedia/en/archive/f/ff/20140529085551!H_parameters_dependent_sources.svg

and here is what it should look like

https://upload.wikimedia.org/wikipedia/en/archive/f/ff/20140529095405!H_parameters_dependent_sources.svg

None of the subscripts have been rendered correctly.  They are all just rendered as small text.  The workaraound is to convert text objects to paths.  This is not a fix and is not a good practice since it means that only the original uploader is able to easily modify the text at a later date (and even they might have problems if they didn't keep a version of the file with text objects).
Comment 18 Andre Klapper 2014-05-29 12:13:14 UTC
(In reply to Spinningspark from comment #17)
> Just to emphasise (since this bug has twice been closed)

Once only, not twice.

> that this bug has not been fixed.

That's why it's still in an open status. :)    Work on fixing should happen in https://bugzilla.gnome.org/show_bug.cgi?id=340047
Comment 19 Spinningspark 2014-05-29 13:04:02 UTC
Sorry for causing everyone on the e-mail list to get pinged, but the bug has been open for eight years and there has been no activity on this page for a year and a half.  The svg format is supposed to be a preferred format but I frequently render images as jpg before uploading due to various rendering issues on Wikimedia.  Given that the bug is causing material to be uploaded in a non-preferred format I thought the bug could do with a bump.  Plus, I provided a direct link to a problematic version, which most of the other links on this page do not do.
Comment 20 Antoine "hashar" Musso (WMF) 2014-06-02 08:49:22 UTC
@Spinningspark  Our bug is tracking the issue reported upstream at https://bugzilla.gnome.org/show_bug.cgi?id=340047 . A way to move along would be to contact upstream authors, provide them example files and have them fix the issue.  There is not much we can do on our side :/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links