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.devel Subject: Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback) Date: Sat, 21 Sep 2024 16:34:17 +0530 Message-ID: <87bk0hfetq.fsf@gmail.com> References: <87cyky43fb.fsf@ice9.digital> <86setu5f85.fsf@gnu.org> <87h6a979ef.fsf@gnu.org> <87h6a9gxvf.fsf@ice9.digital> 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="13768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Tassilo Horn , Eli Zaretskii , emacs-devel@gnu.org To: Morgan Willcock Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 21 13:05:16 2024 Return-path: Envelope-to: ged-emacs-devel@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 1srxvQ-0003RF-Dv for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Sep 2024 13:05:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srxub-0001Di-MW; Sat, 21 Sep 2024 07:04:25 -0400 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 1srxua-0001DZ-SJ for emacs-devel@gnu.org; Sat, 21 Sep 2024 07:04:25 -0400 Original-Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srxuZ-0000R9-0W; Sat, 21 Sep 2024 07:04:24 -0400 Original-Received: by mail-pf1-x441.google.com with SMTP id d2e1a72fcca58-718e2855479so2176944b3a.1; Sat, 21 Sep 2024 04:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726916661; x=1727521461; darn=gnu.org; 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=RxKICsB4hgyWhH2RHiqsuCYzoS1N0XeDm1D+b+SACBE=; b=P8H1eJS7x6Tx4MPkOCCeiBN/zKOmj8noMwkhqP+/+WXxS4QLgdwvCPVBu1WsMFmYUz bgrYRwnzGLLkGoGoz/t6g9zjicT25YHo1o/+qZFbtkGT9I9S6E7YeYqcqcjbe2Ek023/ Kaqo6XARYI68HVu9WZcmdqvslBE1isbih6+yy7+qzXDlIDpI76l3RefkNQQJhq7MPr4K KueDV/2Db9mikizytSPNEl9C5rqg+agC8+mPHsIOBjYGxrIHAIzMHU68tWa692rNwGZQ DUU2ce5TvfT8N00sGy34HXYUEy485spfpzTKsZqJP5N61wvnH1rwZafPSrF+f/p27N0U MZDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726916661; x=1727521461; 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=RxKICsB4hgyWhH2RHiqsuCYzoS1N0XeDm1D+b+SACBE=; b=ZsuAglolz0SujzQA/hferqJY9MAurITyjn1FbxMxLjP3HhIm6Ud3Eu3pKuR0ISIKUe mxDmalalYuGLrOHX2L7tXqb47mR5JbSC8qcasR+JXaFnF43hYrnq6b/QLTviuN8iPl15 TSdZdtEgTcoZulujyGpayxsv5fci7rdDMytIAzaqurKV82eWTX2t1Eo5RXkkYmtR+4Zm onLQpxLbH2z7yVi4gDNxdFMOb49J8m321IU4Uc13wBWSgQ0/z3Dy2uwI7P6P2/WqgVsL lVhxOIxlJRouON/ov9GIeNL3zgKxkZkW/1JG+BYsfZVkc09SEM6Z1s+cTjESndm8IXDH tstA== X-Forwarded-Encrypted: i=1; AJvYcCVSyV8z1C5YQEJnQormBuOonIVCImL749soP/fXDC1BbreAUXj/fJpr8YFu2wp/Fa8vwFtFaXtGtDfVNRI=@gnu.org, AJvYcCVk/KlLe9r2wpikoo9q25Iwqt8s9gpKAr9K9aEMdvaF4y4TRjvodO3E7xZp3qs0jilUbpHv@gnu.org X-Gm-Message-State: AOJu0YzniYMNs7jZyi7rzbhqAKB6UoASi6mQNflsrnzp1aZ5bf90PA0o BcYkDSdfUzdD2LlGmgZu/9t5b2ADhKo907c7EvWLjaIUYAvBq4Ii X-Google-Smtp-Source: AGHT+IEM4n+t/87SFPlir1UjlW6znBLoLATjQd5bIqV7HW2PXVuDnnoSXUCiLBHkDsGq9lQTW3YMcg== X-Received: by 2002:a05:6a00:1746:b0:710:50c8:ddcb with SMTP id d2e1a72fcca58-7199cd7aaf2mr8153553b3a.5.1726916660561; Sat, 21 Sep 2024 04:04:20 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944b9ab85sm11491281b3a.173.2024.09.21.04.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 04:04:20 -0700 (PDT) In-Reply-To: <87h6a9gxvf.fsf@ice9.digital> (Morgan Willcock's message of "Sat, 21 Sep 2024 10:27:32 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x441.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323889 Archived-At: [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=9A=E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F= =E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 21, 2024] Morgan Willcock wro= te: > Tassilo Horn writes: > >> Eli Zaretskii writes: >> >>>> When testing the Emacs 30 pre-release I found that all of the PDF >>>> files which I tried to view were not readable because the text >>>> appeared to be missing. >>>> >>>> Eventually I found the variable doc-view-mupdf-use-svg, and setting >>>> it to nil reverted the rendering to the old method where the text was >>>> visible. >>> >>> Why is that? If your system supports display of SVG images, why >>> wasn't the text readable? Tassilo, any ideas? >> >> I suspect it's some sort of background-equals-foreground issue. I think >> by default, the SVGs have transparent background. So when you use a >> dark theme (I tested with the built-in modus-vivendi theme which is very >> dark), you might get black foreground on black background. > > I use modus-vivendi and sometimes toggle it to modus-operandi to use the > light version. It does seem to be the currently active theme which > makes the text invisible, with the dark theme making the text > unreadable. > > If I load no theme then the documents are rendered normally (as far as I > can tell). > >> Visuwesh already cited the cure: in emacs 29 you might want to set >> doc-view-svg-foreground/background to white/black or vice versa (and >> then re-convert your PDF). > > If I use image-save to save a copy of the SVG file, the conversion > always appears to be usable and a good representation of the original > document, even when what is displayed in the buffer is not. > > Toggling the theme between the light and dark theme while viewing the > image in the buffer toggles it between readable and unreadable. > >> In emacs 30, that has been replaced with the face doc-view-svg-face >> where you can customize foreground and background such that the contrast >> works for you and your theme. >> >> Hm, but doc-view-svg-face inherits from the default face and that is >> white-on-black with modus-vivendi, so actually it should all be good, >> i.e., the PDF display should match your theme. However, depending on >> PDF I tested, I sometimes get white-on-black display (good!) and >> sometimes darkish-on-black (bad!). > > Is there any way to opt-out from the theme having any effect on how the > result is presented while still giving a usable result? You can customise the face doc-view-svg-face to have :background "white" and :foreground "black". >> It seems like it works as intended for "standard black-on-white PDFs" >> but doesn't really work when the PDF is "fancy", e.g., gray foreground >> or colorized borders or what not... > > This does describe the documents I am testing with. They all have some > kind of coloured border. Azure invoices use a light gray foreground > colour with black text on it, while also using a darker gray background > with white text on it.