[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 19ac237 1/4: More-robust svg_load_image fallback
From: |
Paul Eggert |
Subject: |
master 19ac237 1/4: More-robust svg_load_image fallback |
Date: |
Fri, 3 Dec 2021 13:25:38 -0500 (EST) |
branch: master
commit 19ac237c9eeedebbf6bfb23e16d5f9f463e2d80a
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
More-robust svg_load_image fallback
Suggested by Alan Third (Bug#44655#56).
* src/image.c (svg_load_image): Fall back on
rsvg_handle_get_geometry_for_layer if the
rsvg_handle_get_intrinsic_dimensions computations yielded unusable
viewbox width and height, instead of falling back only if
rsvg_handle_get_intrinsic_dimensions did not report image width
and height, or did not report a viewbox.
---
src/image.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/image.c b/src/image.c
index f2597f5..f133049 100644
--- a/src/image.c
+++ b/src/image.c
@@ -10484,6 +10484,9 @@ svg_load_image (struct frame *f, struct image *img,
char *contents,
viewbox_height = viewbox.height;
}
else
+ viewbox_width = viewbox_height = 0;
+
+ if (viewbox_width == 0 || viewbox_height == 0)
{
/* We haven't found a usable set of sizes, so try working out
the visible area. */