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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: da_vid <at> orange.fr, 64908 <at> debbugs.gnu.org
Subject: Re: bug#64908: 29.1; svg parse failure
Date: Sat, 05 Aug 2023 13:07:38 +0300
> Date: Sat, 5 Aug 2023 10:58:26 +0100
> From: Alan Third <alan <at> idiocy.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 64908 <at> debbugs.gnu.org
> 
> diff --git a/src/image.c b/src/image.c
> index c9420b48f4a..96e0f2a7225 100644
> --- a/src/image.c
> +++ b/src/image.c
> @@ -11161,6 +11161,21 @@ svg_css_length_to_pixels (RsvgLength length, double dpi, int font_size)
>      case RSVG_UNIT_IN:
>        value *= dpi;
>        break;
> +    case RSVG_UNIT_PERCENT:
> +      /* Percent is a ratio of the containing "viewport".  We don't
> +	 have a viewport, as such, as we try to draw the image to it's
> +	 own desired size rather than dictate the size as if we were
> +	 drawing icons on a toolbar or similar.  This means that
> +	 percent values are useless to us and we are best off just
> +	 drawing the image according to whatever other sizes we can
> +	 derive.
> +
> +	 If we do set explicit width and height values in the image
> +	 spec, this will work out correctly as librsvg will still
> +	 honour the percentage sizes in its final rendering no matter
> +	 what size we make the image.  */
> +      value = 0;
> +      break;

I don't see RSVG_UNIT_PERCENT anywhere in the librsvg headers on my
system, so perhaps this was introduced by some later version, and
should be guarded by LIBRSVG_CHECK_VERSION?




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.