aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2021-12-03 09:47:22 -0800
committerPaul Eggert2021-12-03 10:25:09 -0800
commit19ac237c9eeedebbf6bfb23e16d5f9f463e2d80a (patch)
tree6740ae171aed116f35cf35b614a6459f5dc6db90 /src
parentc9186b1b0bfb7662a2765aac5dd1afd4309fdfec (diff)
downloademacs-19ac237c9eeedebbf6bfb23e16d5f9f463e2d80a.tar.gz
emacs-19ac237c9eeedebbf6bfb23e16d5f9f463e2d80a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index f2597f529d1..f13304912c8 100644
--- a/src/image.c
+++ b/src/image.c
@@ -10484,6 +10484,9 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
10484 viewbox_height = viewbox.height; 10484 viewbox_height = viewbox.height;
10485 } 10485 }
10486 else 10486 else
10487 viewbox_width = viewbox_height = 0;
10488
10489 if (viewbox_width == 0 || viewbox_height == 0)
10487 { 10490 {
10488 /* We haven't found a usable set of sizes, so try working out 10491 /* We haven't found a usable set of sizes, so try working out
10489 the visible area. */ 10492 the visible area. */