GNU bug report logs -
#44206
28.0.50; SVG image fail to show
Previous Next
Reported by: styang <at> fastmail.com
Date: Sun, 25 Oct 2020 03:26:02 UTC
Severity: normal
Found in version 28.0.50
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44206 in the body.
You can then email your comments to 44206 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44206
; Package
emacs
.
(Sun, 25 Oct 2020 03:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
styang <at> fastmail.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 25 Oct 2020 03:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Some SVG images fail to show due to regression caused by:
b42481e22e * | Fix SVG image dimension calculations (bug#44065)
Please find the offending SVG file in attachment (in fact, all custom avatars in telega.el are not showing). When opened via `emacs -Q 222.svg`, it shows an empty box, with the following message in *Messages*
Invalid image size (see ‘max-image-size’)
Error parsing SVG image ‘(image :type svg :file /tmp/222.svg :scale 1 :max-width 1229 :max-height 585 :format nil)’
Affected librsvg version: 2:2.50.1-1 in Archlinux, and 2.44.10-2.1 in Debian.
[222.svg (image/svg+xml, attachment)]
[Message part 3 (text/plain, inline)]
--
Sheng Yang(杨圣), PhD student
Computer Science Department
University of Maryland, College Park
E-mail: styang <at> fastmail.com
E-mail(old): yangsheng6810 <at> gmail.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44206
; Package
emacs
.
(Sun, 25 Oct 2020 16:02:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44206 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Oct 24, 2020 at 10:25:03PM -0500, styang <at> fastmail.com wrote:
> Some SVG images fail to show due to regression caused by:
> b42481e22e * | Fix SVG image dimension calculations (bug#44065)
>
> Please find the offending SVG file in attachment (in fact, all
> custom avatars in telega.el are not showing).
Thanks. It appears there are more ways to define an SVG size than I've
had hot dinners.
librsvg is really not helping here. The documentation makes it pretty
clear that they don't want us to be querying the SVG dimensions and
would prefer us to just give them the dimensions we want and/or to use
Cairo.
That doesn't really work for us because we don't know up-front what
dimensions are usable for the image. It would be a different matter if
we were using the SVGs as GUI components like buttons or something.
Anyway, I've thrown in another attempt at calculating the image size,
and it works for this and also for the previous images. This one is
more complex because it's trying to convert CSS sizes to pixel sizes
and I don't think we can be entirely sure of some of them (like ex
height? Maybe we can query that, but then we have to know font and
font size).
I have no doubt that there are many more SVG files out there that
won't display properly even with this patch.
> Affected librsvg version: 2:2.50.1-1 in Archlinux, and 2.44.10-2.1 in Debian.
I'm concerned that librsvg 2.44 is affected as it should be using the
same code path as before the commit in question.
--
Alan Third
[0001-Calculate-SVG-image-sizes-more-accurately-bug-44206.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44206
; Package
emacs
.
(Sun, 25 Oct 2020 17:18:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 44206 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for your effort! Patch works for me, librsvg 2.50 on Archlinux.
On Sun, Oct 25, 2020, at 11:01, Alan Third wrote:
> Anyway, I've thrown in another attempt at calculating the image size,
> and it works for this and also for the previous images. This one is
> more complex because it's trying to convert CSS sizes to pixel sizes
> and I don't think we can be entirely sure of some of them (like ex
> height? Maybe we can query that, but then we have to know font and
> font size).
>
> I have no doubt that there are many more SVG files out there that
> won't display properly even with this patch.
I checked places where I use SVG files, especially telega, everything I checked looks good to me now. Hope there are not too many corner cases.
> librsvg is really not helping here. The documentation makes it pretty
> clear that they don't want us to be querying the SVG dimensions and
> would prefer us to just give them the dimensions we want and/or to use
> Cairo.
So could the future of SVG in Emacs lie in Cairo? Forgive me if I am asking a dumb question.
> > Affected librsvg version: 2:2.50.1-1 in Archlinux, and 2.44.10-2.1 in Debian.
>
> I'm concerned that librsvg 2.44 is affected as it should be using the
> same code path as before the commit in question.
My fault, librsvg 2.44 on Debian is NOT affect by this. (I guess I was having internet issue with my vps running debian. Last time I waited for a few seconds and the image was not showing up. I waited a bit longer this time.)
Sheng Yang(杨圣), PhD candidate
Computer Science Department
University of Maryland, College Park
E-mail: styang <at> fastmail.com
E-mail (old but still used): yangsheng6810 <at> gmail.com
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44206
; Package
emacs
.
(Mon, 26 Oct 2020 19:37:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 44206 <at> debbugs.gnu.org (full text, mbox):
On Sun, Oct 25, 2020 at 12:17:16PM -0500, Sheng Yang wrote:
> Thanks for your effort! Patch works for me, librsvg 2.50 on Archlinux.
>
> On Sun, Oct 25, 2020, at 11:01, Alan Third wrote:
> > Anyway, I've thrown in another attempt at calculating the image size,
> > and it works for this and also for the previous images. This one is
> > more complex because it's trying to convert CSS sizes to pixel sizes
> > and I don't think we can be entirely sure of some of them (like ex
> > height? Maybe we can query that, but then we have to know font and
> > font size).
> >
> > I have no doubt that there are many more SVG files out there that
> > won't display properly even with this patch.
>
> I checked places where I use SVG files, especially telega,
> everything I checked looks good to me now. Hope there are not too
> many corner cases.
Thanks.
> > librsvg is really not helping here. The documentation makes it pretty
> > clear that they don't want us to be querying the SVG dimensions and
> > would prefer us to just give them the dimensions we want and/or to use
> > Cairo.
>
> So could the future of SVG in Emacs lie in Cairo? Forgive me if I am
> asking a dumb question.
Not a dumb question. This came up a little while back and I think
there might be potential issues with getting Cairo on Windows, so it's
not necessarily a great solution.
One thing is that, in theory, if we were using SVGs for parts of the
UI, like fringe bitmaps, we wouldn't have to worry too much about
resizing and so on as we control the SVGs and can define them to suit
our uses.
> > > Affected librsvg version: 2:2.50.1-1 in Archlinux, and 2.44.10-2.1 in Debian.
> >
> > I'm concerned that librsvg 2.44 is affected as it should be using the
> > same code path as before the commit in question.
>
> My fault, librsvg 2.44 on Debian is NOT affect by this. (I guess I
> was having internet issue with my vps running debian. Last time I
> waited for a few seconds and the image was not showing up. I waited
> a bit longer this time.)
Ah, good to know. Thanks!
--
Alan Third
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44206
; Package
emacs
.
(Tue, 10 Nov 2020 00:55:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 44206 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
It has been some time since the last activity on this bug report, and the broken SVG display can be annoying for uses that need it, e.g. telega users.
@Alan: Is there any particular reason for not merging your patch to the master?
Sheng Yang(杨圣), PhD candidate
Computer Science Department
University of Maryland, College Park
E-mail: styang <at> fastmail.com
E-mail (old but still used): yangsheng6810 <at> gmail.com
[Message part 2 (text/html, inline)]
Reply sent
to
Alan Third <alan <at> idiocy.org>
:
You have taken responsibility.
(Tue, 10 Nov 2020 10:46:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
styang <at> fastmail.com
:
bug acknowledged by developer.
(Tue, 10 Nov 2020 10:46:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 44206-done <at> debbugs.gnu.org (full text, mbox):
On Mon, Nov 09, 2020 at 06:54:22PM -0600, Sheng Yang wrote:
> It has been some time since the last activity on this bug report,
> and the broken SVG display can be annoying for uses that need it,
> e.g. telega users.
>
> @Alan: Is there any particular reason for not merging your patch to
> the master?
Hi, sorry for the delay, it was pushed to master yesterday.
--
Alan Third
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Dec 2020 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.