From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#58041: [PATCH] docview: Use svg images when using mupdf for conversion Date: Sun, 08 Jan 2023 11:39:16 +0530 Message-ID: <87eds5zhf7.fsf@gmail.com> References: <87k05t848c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6584"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58041@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 08 07:10:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pEOsv-0001V2-LA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Jan 2023 07:10:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEOsd-0004Sl-W7; Sun, 08 Jan 2023 01:10:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEOsc-0004SY-HY for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 01:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEOsc-0006LK-7R for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 01:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEOsb-0004iI-Ri for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 01:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2023 06:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58041 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58041-submit@debbugs.gnu.org id=B58041.167315816718050 (code B ref 58041); Sun, 08 Jan 2023 06:10:01 +0000 Original-Received: (at 58041) by debbugs.gnu.org; 8 Jan 2023 06:09:27 +0000 Original-Received: from localhost ([127.0.0.1]:59718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEOs3-0004h3-E0 for submit@debbugs.gnu.org; Sun, 08 Jan 2023 01:09:27 -0500 Original-Received: from mail-pl1-f196.google.com ([209.85.214.196]:46031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEOs0-0004go-QU for 58041@debbugs.gnu.org; Sun, 08 Jan 2023 01:09:25 -0500 Original-Received: by mail-pl1-f196.google.com with SMTP id g16so6108372plq.12 for <58041@debbugs.gnu.org>; Sat, 07 Jan 2023 22:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SaXZ1ItScEwZUeLwoiiDhLmNQl5sa0mkc6ez1v/4bkE=; b=fTEQVR0DGXSE2B2kOSmtWEqHR2ELcVTeU8MdT5favAlY31Dzp/CUotMydszqjcnuMI 7tDNQYXaD6JdW+lqTkhpRuOeMLMlgk9SONJfuiHbL2bJB1afZ+08GHZhDQZqnuiGRbu5 VpbFh7XsPQ9SCL9KvbnaPO43PPkpIAFIJ8wQ4FjS96v77dHTy0Js1Ub89N7R8WGv5yuY TP11rT4YpkScelAaZarvwpo3jDS75GlcoHccWwdQER2FE4NAfe6olPLRMAZYTvURN7c/ l+4sXPOjCglEcCLPlZPXeHV9y2OLe5iotPXMKhIoVzQhqW6CfEOD5X0fo0t3QUjok18t MS0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SaXZ1ItScEwZUeLwoiiDhLmNQl5sa0mkc6ez1v/4bkE=; b=gto+V+oNlXFEaH7vM2Oo6voB9IX6cHnk/8Iubh9msA12TfoJytaqjR9g0QIV47KAoo N6MONJ+9O0IGaifuIlAZoqEqDi34Omo+zEB0jviYLi2nzZKcABweJcN0powHTb2GzqBd AmBIKuVei/+60ogVeLa5hMNwFja4UUK3KcvvGm9e0Boh/JGF4JT50cZ38LaRFnL8kgaV dj5+DOAg8Pt6TTbAY8fTM6pnH5NH8PpTKeBljsS4xgQsOcmpBQl8UNpVWJ+4J+812lsI 51nUf85lfEbcmwUz8rbJd1prgZGQNTq8D4kI8l+Z+JEN+hUVvjSZgUZxeg+zwHBIvkA/ nE6Q== X-Gm-Message-State: AFqh2ko2CLh/ZzMd4An1gbUM/cWuNN2/whQTuIaP+Mj8C8Qi6fHiZYvX 1AhA/kAXwDatPE2hd4MR5e4= X-Google-Smtp-Source: AMrXdXsca+MpKDxxsJBgIg3EVI8/e+NezgGkFALDSIqUYmfuQxUz/NkSy15CCkGGDUygEBBzOeTVyA== X-Received: by 2002:a05:6a21:1518:b0:af:e4c5:28e2 with SMTP id nq24-20020a056a21151800b000afe4c528e2mr73889780pzb.17.1673158158961; Sat, 07 Jan 2023 22:09:18 -0800 (PST) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id h18-20020a656392000000b0046b1dabf9a8sm3108002pgv.70.2023.01.07.22.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 22:09:18 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 04 Jan 2023 14:54:14 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252870 Archived-At: [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=9C=E0=AE=A9=E0=AE=B5= =E0=AE=B0=E0=AE=BF 04, 2023] Stefan Monnier wrote: >> Attached patch makes mupdf produce svg images rather than png when svg >> support is available. This makes a noticeable improvement in image >> quality when zooming in. > > IIUC this means that `+` and `-` now don't need to re-process the PDF, ri= ght? > I think this is particularly valuable for things like ODT where `+/-` > was pretty slow (because it re-created the PDF each time before having > a chance to focus on the current page). It depends on the value of `doc-view-scale-internally'. The default value (t) implies that we change the :width image property which leads to blurry images when zooming. In my case, even without zooming in, the image quality was noticeably worse. If `doc-view-scale-internally' is nil though, what you say happens. > If that's the case it's probably worth mentioning in NEWS. > >> This also improves epub, odt, docx, etc. rendering since they also end >> up using mupdf. I'm not sure if this is NEWS worthy though. > > Other reasons it's worth mentioning in NEWS is because there's a new > Custom to control it, and because it causes a regression for those LaTeX > files which end up embedding bitmap fonts. I just bumped into one and > couldn't understand why every page took almost a minute to load; > Removing `\usepackage[T1]{fontenc}` fixed the problem. For the most part, I assumed MuPDF's svg and png conversion was one-to-one. My testing with small docx and Excel files went smooth so I didn't think this feature warranted a NEWS entry. > > Stefan P.S. Sorry for the late reply, start of the semester had me busy.