From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback) Date: Mon, 23 Sep 2024 18:10:34 +0200 Message-ID: <87tte64ah1.fsf@gnu.org> References: <87cyky43fb.fsf@ice9.digital> <86setu5f85.fsf@gnu.org> <87zfo22jy4.fsf@ice9.digital> <86bk0h5sx9.fsf@gnu.org> <87ldzlgxvh.fsf@ice9.digital> <87msk0oqoq.fsf@gnu.org> <87plovmmox.fsf@ice9.digital> <8734lqzx64.fsf@gnu.org> <877cb2kbta.fsf@ledu-giraud.fr> <8634lqh9bt.fsf@gnu.org> <87msjyv2xb.fsf@gnu.org> <86msjyfkn3.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="38611"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.6; emacs 31.0.50 Cc: manuel@ledu-giraud.fr, morgan@ice9.digital, emacs-devel@gnu.org, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 23 18:11:28 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 1sslep-0009rX-U5 for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 18:11:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssle8-0004Gf-TN; Mon, 23 Sep 2024 12:10:44 -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 1ssle7-0004GL-IH for emacs-devel@gnu.org; Mon, 23 Sep 2024 12:10:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssle5-0007eJ-EB; Mon, 23 Sep 2024 12:10:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=JiOvnkMi/CoWPD41XeFEnKloJXJDf/ptcY8DZg70TSw=; b=kixuSVtNkDOIFJ2/YK6V cGQPH8CK96bkdGNh/5XF3s+KWtAfLtl3L9+gQUvf7X8PB9zyMPAT5lyoIaIJh3gZVNYdYK8XQUAJ4 rK0Z7JIhikmNWYzNWZ9WmN5bVdHT/v04PynivZynawShSQri7hkYgGTErIHhj6Fo89yUTKWM5jSGm gWDJ6MiCW8j/DrKpQDz5oSRwnvq9o3zg1VY8EFokI+qI1LHnkOKBvdMF6o3iCvtLvilCsI7BjWGvl z7fMsjQeTKN6SSrdJNN+6XDQux/KL4cm/VsZwSb8EyHIYskbbiWwlNV2z8w8Jq1mXe1UWNq5hqM8q nM3EJnpRYIsbLQ==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelledgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesthdtredttdertden ucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenuc ggtffrrghtthgvrhhnpeeluddvgeefuddvjeekfeetleegtefgveehhfeuffeuffeghefg ueefgfdvffegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieej feekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilh drfhhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehvihhsuhifvghshhhmsehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghmrggtshdqug gvvhgvlhesghhnuhdrohhrghdprhgtphhtthhopehmohhrghgrnhesihgtvgelrdguihhg ihhtrghlpdhrtghpth X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: <86msjyfkn3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Sep 2024 18:35:28 +0300") 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:323974 Archived-At: Eli Zaretskii writes: >> Only background and foreground colors are used. >> -See `doc-view-mupdf-use-svg'." >> +See `doc-view-mupdf-use-svg'. >> + >> +If foreground and background color are not specified explicitly and >> +therefore inherit from the `default' face, the default >> +foreground/background color values are passed to `create-image' when >> +preparing the SVG for display in the doc-view buffer. The effect is >> +that the current theme's foreground/background values are applied to the >> +SVG display. Note that this doesn't work for documents which are not >> +simply black-on-white where it can lead to unreadable documents due to >> +foreground and background color being equal or similar." >> :version "30.1") > > I think this is too technical, and describes what the face definitions > do. I think we only need to say there that if the face's colors cause > color SVG images display with low contrast between foreground and > background, the user should customize the face to produce a better > contrast. Indeed. > Also, I thought we agreed to also have some text in NEWS to delineate > this issue. Right. So next try, including a change of the NEWS entry for the face: --8<---------------cut here---------------start------------->8--- diff --git a/etc/NEWS b/etc/NEWS index 8ed16cfeeff..c72a87787f3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1544,10 +1544,12 @@ default is non-nil if your system supports display of SVG images. --- *** New face 'doc-view-svg-face'. This replaces 'doc-view-svg-foreground' and 'doc-view-svg-background'. -If you don't like the colors produced by the default definition of -this new face when DocView displays documents, customize this face to -restore the colors you were used to, or to get colors more to your -liking. +By default, this face has black foreground on white background and +inherits from the default face. When unsetting the foreground and +background values, the display in DocView is styled according to the +current theme. However, this, or any non-standard values, can result in +poor contrast for documents which aren't simply black text on white +background. --- *** DocView buffers now display a new tool bar. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 15352630d25..1ed0c71febe 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -238,10 +238,15 @@ doc-view-imenu-flatten :type 'boolean :version "29.1") -(defface doc-view-svg-face '((t :inherit default)) +(defface doc-view-svg-face '((t :inherit default + :background "white" + :foreground "black")) "Face used for SVG images. -Only background and foreground colors are used. -See `doc-view-mupdf-use-svg'." +See `doc-view-mupdf-use-svg'. + +Only background and foreground colors are used as the SVG image's +descriptors, see (info \"(elisp) SVG Images\"). Non-standard values may +cause low-contrast issues with certain documents." :version "30.1") (make-obsolete 'doc-view-svg-background 'doc-view-svg-face "30.1") --8<---------------cut here---------------end--------------->8--- Bye, Tassilo