From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock 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 10:27:32 +0100 Message-ID: <87h6a9gxvf.fsf@ice9.digital> References: <87cyky43fb.fsf@ice9.digital> <86setu5f85.fsf@gnu.org> <87h6a979ef.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33145"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 21 11:28:35 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 1srwPq-0008QI-Fs for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Sep 2024 11:28:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srwP4-0008BX-0P; Sat, 21 Sep 2024 05:27:46 -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 1srwP1-0008Ak-5T for emacs-devel@gnu.org; Sat, 21 Sep 2024 05:27:43 -0400 Original-Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srwOy-0007iM-LC; Sat, 21 Sep 2024 05:27:42 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id BF31020004; Sat, 21 Sep 2024 09:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1726910853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nq7d9zgYYfbqtJUvHoJRI6sx9v5bMcDwsrD6uRbg+2c=; b=ICE22SJSgzNaPd1kh5lVY6L6OC5Gf6B1QjAp/dkfUyriU5UAI6jwp3cpPZySzyyvkmXwk9 0Ka/hN3GCDrn718zcczfIRf0R+YkRvcx0kgopgkbeM+kTC8QijJkgd97C7osNnyN7Hs7P6 PfdpTkd2+ZT1lELC30X8O0P0buL37Q3eg16RP+z7JXnD/p+pMy9C7gKH2XAgKe+QIrtTMo cy1/ymgs2x3fZKbh7kJNTOTtsqDA9V6nb/4gaY5ZXc8a05xer8Fj3rkIFVKRfybqqLJpKu m3uoNa1YuEWmC1ktbj1DdDKKHY6JDAsqRACgsr/CO44c/AKdWRBnBJcJDxFVTw== In-Reply-To: <87h6a979ef.fsf@gnu.org> (Tassilo Horn's message of "Sat, 21 Sep 2024 09:28:40 +0200") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=2001:4b98:dc4:8::227; envelope-from=morgan@ice9.digital; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:323887 Archived-At: 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? > 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. -- Morgan Willcock