Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jun 4, 2022
1 parent 9d804bf commit 2e7ce81
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions woof-code/rootfs-petbuilds/jwm/571.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 0fdeafa10373514fbabb1eb8dd9505cf414e1f8d Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima@dimakrasner.com>
Date: Sat, 4 Jun 2022 15:48:38 +0800
Subject: [PATCH] fall back to the 2.3.7 behavior when SVG image size in pixels
is unknown

Fixed #571.
---
src/image.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/src/image.c b/src/image.c
index 3431c8ce..a6f8f9f4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -483,6 +483,14 @@ ImageNode *LoadSVGImage(const char *fileName, int rwidth, int rheight,
} else if(has_viewbox) {
dim.width = viewbox.width;
dim.height = viewbox.height;
+ } else if(rwidth == 0 && rheight == 0) {
+#if LIBRSVG_CHECK_VERSION(2, 52, 0)
+ rsvg_handle_get_intrinsic_size_in_pixels(rh, &pwidth.length, &pheight.length);
+ dim.width = pwidth.length;
+ dim.height = pheight.length;
+#else
+ rsvg_handle_get_dimensions(rh, &dim);
+#endif
} else {
dim.width = rwidth;
dim.height = rheight;
1 change: 1 addition & 0 deletions woof-code/rootfs-petbuilds/jwm/petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ download() {
build() {
tar -xJf jwm-2.4.2.tar.xz
cd jwm-2.4.2
patch -p1 < ../571.patch
./configure --prefix=/usr --sysconfdir=/etc
make install
}

0 comments on commit 2e7ce81

Please sign in to comment.