Last modified: 2014-04-08 21:31:37 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 T36947, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34947 - Incorrect text positioning in SVG rasterization (scale/transform : font-size; kerning)
Incorrect text positioning in SVG rasterization (scale/transform : font-size;...
Status: NEW
Product: Wikimedia
Classification: Unclassified
SVG rendering (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 31122
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-04 10:10 UTC by Craig Sapp
Modified: 2014-04-08 21:31 UTC (History)
5 users (show)

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


Attachments
scaled & not scaled font (376 bytes, text/plain)
2014-03-23 20:52 UTC, PRO
Details
[[:File:Fonttest-Kerning.svg]] (19.26 KB, image/svg+xml)
2014-03-24 00:03 UTC, PRO
Details

Description Craig Sapp 2012-03-04 10:10:50 UTC
In the PNG conversions of this file:
   http://commons.wikimedia.org/wiki/File:Hummel_Prelude_Op_67_No_11.svg
the text is not being rendered properly.  Character spacing is too wide (but variable), and text position is placed lower than expected. 

The text displays properly in Firefox and Chrome viewing directly in the browser:
   http://upload.wikimedia.org/wikipedia/commons/d/d8/Hummel_Prelude_Op_67_No_11.svg

Text in SVG files I uploaded yesterday and which were created in a similar manner did not have a PNG rendering problem, such as:

http://commons.wikimedia.org/wiki/File:Beethoven_piano_sonata_14_mvmt_1_bar_1-4.svg

http://commons.wikimedia.org/wiki/File:Beethoven_piano_sonata_14_mvmt_2_bar_1-8.svg

http://commons.wikimedia.org/wiki/File:Beethoven_piano_sonata_14_mvmt_3_bar_1-3.svg
Comment 1 Brion Vibber 2012-03-08 00:41:36 UTC
I can confirm this is rendering incorrectly; not obvious why. Text looks like it's done straightforwardly, doesn't have any manual positioning or other odd things.

Could be a bug in rsvg or with the font...
Comment 2 Mark A. Hershberger 2012-03-08 00:49:57 UTC
Should check this once bug 31122 is fixed.
Comment 3 Derk-Jan Hartman 2012-10-26 09:54:49 UTC
This problem still exists.
Comment 4 PRO 2014-03-23 20:50:34 UTC
I've analyzed the file. It is an extremely high ratio of scaling and font size. ~900:1. The affected file has an scale of ~900. The other unaffected SVGs are nearly equal with the difference that the font-size is ~900.

So you can simple fix this test:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="2000 -20000 30000 20000" width="750" height="600">
<text transform="translate(12296,-3469) scale(1,1)" font-size="900" style="font-family:Nimbus Roman No9 L">Prelude in B major</text>
<text transform="translate(12296,-6000) scale(910,910)" font-size="1" style="font-family:Nimbus Roman No9 L">Prelude in B major</text
</svg>
Comment 5 PRO 2014-03-23 20:52:17 UTC
Created attachment 14884 [details]
scaled & not scaled font
Comment 6 PRO 2014-03-24 00:03:31 UTC
Created attachment 14885 [details]
[[:File:Fonttest-Kerning.svg]]

Old example of font-kerning from German SVG-help page. It shows the dependency between font transformation/scaling and size.

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


Navigation
Links