GNU bug report logs - #58041
[PATCH] docview: Use svg images when using mupdf for conversion

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Sat, 24 Sep 2022 10:20:01 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 58041 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 58041 <at> debbugs.gnu.org
Subject: Re: bug#58041: [PATCH] docview: Use svg images when using mupdf for
 conversion
Date: Thu, 12 Jan 2023 16:11:04 -0500
> @@ -489,7 +489,7 @@ doc-view-single-page-converter-function
>  
>  (defvar-local doc-view--image-type nil
>    "The type of image in the current buffer.
> -Can be `png' or `tiff'.")
> +Can be `png', `svg', or `tiff'.")
>  
>  (defvar-local doc-view--image-file-pattern nil
>    "The `format' pattern of image file names.
> @@ -921,7 +921,9 @@ 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
> +          (and (eq doc-view--image-type 'svg)
> +               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 +943,9 @@ 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
> +          (and (eq doc-view--image-type 'svg)
> +               doc-view-mupdf-use-svg))
>        (progn
>  	(kill-local-variable 'doc-view-image-width)
>  	(doc-view-insert-image

Looks OK to me, tho I wonder why we still need to check
`doc-view-mupdf-use-svg`.
Isn't it sufficient to check (eq doc-view--image-type 'svg)?


        Stefan





This bug report was last modified 2 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.