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.
Full log
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)]
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.