GNU bug report logs - #64908
29.1; svg parse failure

Previous Next

Package: emacs;

Reported by: Daniel Vianna <dmlvianna <at> gmail.com>

Date: Fri, 28 Jul 2023 01:12:02 UTC

Severity: normal

Tags: unreproducible

Found in version 29.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


Message #88 received at 64908 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: David Ponce <da_vid <at> orange.fr>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 64908 <at> debbugs.gnu.org
Subject: Re: bug#64908: 29.1; svg parse failure
Date: Sat, 5 Aug 2023 19:31:24 +0100
[Message part 1 (text/plain, inline)]
On Sat, Aug 05, 2023 at 08:00:17PM +0200, David Ponce wrote:
> On 05/08/2023 19:39, Alan Third wrote:
> > On Sat, Aug 05, 2023 at 07:37:01PM +0200, David Ponce wrote:
> > > 
> > > I just tried patch V3, and the result is the same:
> > > insert-image produces the same black square of 22x22 pixels.
> > 
> > Can you try changing the initialisation of zero_rect to {0, 0, 10,
> > 10}?
> > 
> > I remember a lot of trial and error with this originally, and it looks
> > like they may have changed how it works.
> 
> It is better :-)
> 
> Before call to rsvg_handle_get_geometry_for_layer:
> 
> (gdb) print zero_rect
> $1 = {x = 0, y = 0, width = 10, height = 10}
> (gdb) print viewbox
> $2 = {x = 6.9533474147268633e-310, y = 2.3106462124703418e-319, width = 5.8283471538673388e-315, height = 9.8813129168249309e-323}
> (gdb) print out_logical_rect
> $3 = {x = 6.9533558057749482e-310, y = 6.9533473517748961e-310, width = 1.4821969375237396e-323, height = 3.0586981611317814e-317}
> 
> After call:
> 
> (gdb) print $eax
> $4 = 1
> (gdb) print zero_rect
> $5 = {x = 0, y = 0, width = 10, height = 10}
> (gdb) print viewbox
> $6 = {x = 7, y = 3, width = 8.70703125, height = 16}
> (gdb) print out_logical_rect
> $7 = {x = 7, y = 3, width = 8.70703125, height = 16}
> 
> Now I see the image, aligned at bottom right on the line (see the screenshot).

OK. I really don't understand how this works, and I'm sure some older
version of librsvg required a viewport of zero size, but I don't know
which, so this is all a bit of a stab in the dark. Anyway, patch
attached with a viewport that is hopefully big enough for all the SVGs
we'll ever see. :)

-- 
Alan Third
[v4-0001-Fix-percentage-sizes-in-SVG-display-bug-64908.patch (text/x-diff, attachment)]

This bug report was last modified 1 year and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.