unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: da_vid@orange.fr, 64908@debbugs.gnu.org
Subject: bug#64908: 29.1; svg parse failure
Date: Sat, 05 Aug 2023 13:41:20 +0300	[thread overview]
Message-ID: <83v8dtsre7.fsf@gnu.org> (raw)
In-Reply-To: <ZM4jU/HrfG0U1EVY@idiocy.org> (message from Alan Third on Sat, 5 Aug 2023 11:24:19 +0100)

> Date: Sat, 5 Aug 2023 11:24:19 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: da_vid@orange.fr, 64908@debbugs.gnu.org
> 
> On Sat, Aug 05, 2023 at 01:07:38PM +0300, Eli Zaretskii wrote:
> > > Date: Sat, 5 Aug 2023 10:58:26 +0100
> > > From: Alan Third <alan@idiocy.org>
> > > Cc: Eli Zaretskii <eliz@gnu.org>, 64908@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?
> 
> Hmm, I can't find any reference to when it was introduced, so it's
> probably easier just to remove it and put the comment in the default
> case.

My guess is it was introduced in v2.46, as the entire code of
svg_css_length_to_pixels is guarded by that version.  So I think using
RSVG_UNIT_PERCENT in that function is fine.





  reply	other threads:[~2023-08-05 10:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  1:10 bug#64908: 29.1; svg parse failure Daniel Vianna
2023-07-28  6:05 ` Eli Zaretskii
     [not found]   ` <CAMLJ+NHO38NYGPctAj9MmMwy4tz8aSqHgLDWQhQaDm7FUP7Yqw@mail.gmail.com>
2023-07-28 11:00     ` Eli Zaretskii
2023-07-28 12:48       ` Visuwesh
2023-08-03  8:11         ` Eli Zaretskii
2023-08-03 19:16 ` David Ponce
2023-08-04  5:23   ` Eli Zaretskii
2023-08-04  7:55     ` David Ponce
2023-08-04 10:26       ` Eli Zaretskii
2023-08-04 16:23         ` David Ponce
2023-08-04 18:32         ` Alan Third
2023-08-04 19:08           ` Eli Zaretskii
2023-08-04 21:08             ` David Ponce
2023-08-05  8:30               ` David Ponce
2023-08-05  9:58                 ` Alan Third
2023-08-05 10:07                   ` Eli Zaretskii
2023-08-05 10:24                     ` Alan Third
2023-08-05 10:41                       ` Eli Zaretskii [this message]
2023-08-05 12:32                   ` David Ponce
2023-08-05 15:14                     ` Alan Third
2023-08-05 15:53                       ` David Ponce
2023-08-05 16:02                         ` Alan Third
2023-08-05 16:24                           ` David Ponce
2023-08-05 16:31                             ` Alan Third
2023-08-05 17:37                               ` David Ponce
2023-08-05 17:39                                 ` Alan Third
2023-08-05 18:00                                   ` David Ponce
2023-08-05 18:31                                     ` Alan Third
2023-08-05 20:04                                       ` David Ponce
2023-08-08 13:58                                         ` David Ponce
2023-08-08 21:18                                           ` Alan Third
2023-08-08 22:22                                             ` David Ponce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v8dtsre7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64908@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=da_vid@orange.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).