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 #46 received at 64908 <at> debbugs.gnu.org (full text, mbox):

From: David Ponce <da_vid <at> orange.fr>
To: Eli Zaretskii <eliz <at> gnu.org>, Alan Third <alan <at> idiocy.org>
Cc: 64908 <at> debbugs.gnu.org
Subject: Re: bug#64908: 29.1; svg parse failure
Date: Sat, 5 Aug 2023 10:30:38 +0200
[Message part 1 (text/plain, inline)]
On 04/08/2023 23:08, David Ponce wrote:
> On 04/08/2023 21:08, Eli Zaretskii wrote:
>>> Date: Fri, 4 Aug 2023 19:32:13 +0100
>>> From: Alan Third <alan <at> idiocy.org>
>>> Cc: David Ponce <da_vid <at> orange.fr>, 64908 <at> debbugs.gnu.org
>>>
>>> On Fri, Aug 04, 2023 at 01:26:45PM +0300, Eli Zaretskii wrote:
>>>>
>>>> Thanks.  I hope this will help an SVG expert to figure out what's
>>>> going on with these images.
>>>>
>>>> Alan, do you have time to look into this, per chance?
>>>
>>> Yeah. I know roughly what needs to be done here thanks to David's most
>>> recent email, but I'll have a wee think about how best to do it since
>>> we already have, I think, three different methods of finding the image
>>> size depending on the version of librsvg. If I can merge a couple of
>>> those approaches it will probably be best.
>>
>> Thanks in advance.
> 
> Eli, Alan,
> 
> Until Alan finds the best solution, the attached simple patch fixed
> the issue for me with librsvg 2.56.3.
> 
> Thanks & Regards

Hello,

I attached a better patch, because it is possible to have svg image
definition that combines viewBox, and percentage of width/height, like
in this example:

(insert-image
  '(image :type svg :data
     "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22 22\" width=\"110%\" height=\"80%\">
  <defs id=\"defs3051\">
    <style type=\"text/css\" id=\"current-color-scheme\">
      .ColorScheme-Text {
        color:#232629;
      }
      </style>
  </defs>
 <path
    style=\"fill:currentColor;fill-opacity:1;stroke:none\"
    d=\"m7.707031 3l-.707031.707031 6.125 6.125 1.167969 1.167969-1.167969 1.167969-6.125 6.125.707031.707031 6.125-6.125 1.875-1.875-1.875-1.875-6.125-6.125\"
    class=\"ColorScheme-Text\"
    />
</svg>"
    :scale 1))

I hope Alan will find a simpler implementation for all these cases!

Thanks & Regards
[image.c.patch (text/x-patch, 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.