Page MenuHomePhabricator

SVG images are rendered too big
Closed, ResolvedPublic

Description

Take a look at the PDF version of a page such as [[wikibooks:pt:Norueguês]], which uses the [[Image:7de8.svg]] in the list of chapters.

In the PDF version, the image is scaled to a size bigger than it is on the HTML page.

Is it possible to fix that?


Version: unspecified
Severity: normal
URL: http://pt.wikibooks.org/w/index.php?title=Especial:Livro&bookcmd=render_article&arttitle=Noruegu%C3%AAs&oldid=203548&writer=rl

Details

Reference
bz30548

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:53 PM
bzimport added a project: Collection.
bzimport set Reference to bz30548.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 8970
Big images

Attached:

Looks like the mwlib rendering system isn't properly detecting the native size of these images.

They're not being given an explicit size on the invocation, so the native size is used -- which in the file is defined as a nice compact 10x10:

<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">

If mwlib doesn't understand that it may be defaulting to some fairly large size... or perhaps just "size to fit", since the green & yellow images (both defined as 10x10 pixels) get rendered at different sizes.