--- src/xoj-preview-extractor/xournalpp-thumbnailer.cpp 2026-02-03 16:56:24.000000000 +0800 +++ src/xoj-preview-extractor/xournalpp-thumbnailer.cpp 2026-02-04 06:12:21.000000000 +0800 @@ -187,15 +187,14 @@ logMessage((_F("xoj-preview-extractor: could not find icon \"{1}\"") % iconName).str(), true); } else { rsvg_handle_set_dpi(handle, 90); // does the dpi matter for an icon overlay? + RsvgDimensionData dims; + rsvg_handle_get_dimensions(handle, &dims); + // Render at bottom right cairo_t* cr = cairo_create(thumbnail); - const RsvgRectangle viewport{width - iconSize, height - iconSize, iconSize, iconSize}; - GError* error = nullptr; - rsvg_handle_render_document(handle, cr, &viewport, &error); - if (error != nullptr) { - g_warning("Could not render the icon"); - g_clear_error(&error); - } + cairo_translate(cr, width - iconSize, height - iconSize); + cairo_scale(cr, iconSize / dims.width, iconSize / dims.height); + rsvg_handle_render_cairo(handle, cr); } cairo_surface_write_to_png(thumbnail, argv[2]); } else { --- CMakeLists.txt 2026-07-13 19:43:51.000000000 +0800 +++ CMakeLists.txt 2026-08-09 17:21:07.000000000 +0800 @@ -149,7 +149,7 @@ list(APPEND pkg-module-spec "gthread-2.0 >= 2.4.0") list(APPEND pkg-module-spec "libxml-2.0 >= 2.0.0") list(APPEND pkg-module-spec "libzip >= 1.0.1") -list(APPEND pkg-module-spec "librsvg-2.0 >= 2.46") +list(APPEND pkg-module-spec "librsvg-2.0 >= 2.40") # Profiling option (ENABLE_PROFILING "Link with gperftools" OFF)