[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58041: [PATCH] docview: Use svg images when using mupdf for conversi
From: |
Stefan Monnier |
Subject: |
bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion |
Date: |
Thu, 12 Jan 2023 16:11:04 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> @@ -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
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, (continued)
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Visuwesh, 2023/01/09
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Gregory Heytings, 2023/01/09
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Stefan Monnier, 2023/01/09
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Visuwesh, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Eli Zaretskii, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Visuwesh, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Eli Zaretskii, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Stefan Monnier, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Stefan Monnier, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion, Visuwesh, 2023/01/12
- bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion,
Stefan Monnier <=