GNOME Bugzilla – Bug 612560
Size and width of a sub-element of an SVG are wrong for KDE card decks
Last modified: 2010-03-11 14:06:55 UTC
Created attachment 155851 [details] KDE card decks Calling the rsvg-dimensions test application from librsvg-2.26.0 on the (unzipped oxygen.svgz) KDE card-images gives the following (beautified) output: $ ./rsvg-dimensions /tmp/cards.svg /tmp/cards.svg: 2105x1488, em=2105.000000, ex=1488.000000 $ ./rsvg-dimensions /tmp/cards.svg -f \#4_club /tmp/cards.svg, fragment `#4_club': x=497, y=35, 12981x18336, em=12981.000000, ex=18336.000000 The whole SVG has a size of 2105x1488, but the sub-image claims to be of size 12981x18336; i.e. ways bigger than the actual image (try and error makes me believe that its size is around 160x200). Not surprisingly rsvg_handle_get_pixbuf_sub() also gives a wrong image, the 4 of club is squeezed into the upper-right corner. Changing the calls to use GNOME's card-images works fine (i.e. it's not rsvg-dimensions being the problem). I tried to debug a bit into that and added some output to rsvg-base.c to show the values involved in the size-calculation (by adding the following lines at line 1391): printf ("X-Factor: %c -> %f %f %f\n", root->w.factor, bbox.w, handle->priv->dpi_x, bbox.w + bbox.x * 2); printf ("Y-Factor: %c -> %f %f %f\n", root->h.factor, bbox.h, handle->priv->dpi_y, bbox.h + bbox.y * 2); This gives the following output: X-Factor: i -> 144.230469 90.000000 1137.738281 Y-Factor: i -> 203.734375 90.000000 272.914062 I'm quite at loss here and can't even say if this is a problem with librsvg, cairo or the KDE card-images (I don't have KDE installed, only the images). I attached the (original, compressed) KDE card-deck.
Dup of bug 564527 ?
Sounds like it (even with the same test-file, only asking for another sub-image i.e. card). Sorry, I *was* checking the bug-database, but it seems not thoroughly enough. Any idea when this fix will be out? *** This bug has been marked as a duplicate of bug 564527 ***