From 8e003e7127ff929306faef8e65af31cf8c7e4d08 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 12 Jan 2023 12:03:49 +0530 Subject: [PATCH 2/2] Use internal image scaling when using SVG images in doc-view * lisp/doc-view.el (doc-view-enlarge, doc-view-scale-reset): Default to changing the :width image property when using SVG images even if doc-view-scaling-internally is nil. (bug#58041) --- lisp/doc-view.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 7c272f52fb..19204f25b4 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -921,7 +921,7 @@ doc-view-shrink-factor (defun doc-view-enlarge (factor) "Enlarge the document by FACTOR." (interactive (list doc-view-shrink-factor)) - (if doc-view-scale-internally + (if (or doc-view-scale-internally doc-view-mupdf-use-svg) (let ((new (ceiling (* factor doc-view-image-width)))) (unless (equal new doc-view-image-width) (setq-local doc-view-image-width new) @@ -941,7 +941,7 @@ doc-view-shrink (defun doc-view-scale-reset () "Reset the document size/zoom level to the initial one." (interactive) - (if doc-view-scale-internally + (if (or doc-view-scale-internally doc-view-mupdf-use-svg) (progn (kill-local-variable 'doc-view-image-width) (doc-view-insert-image -- 2.38.1