From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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:35:28 +0300 Message-ID: <86msjyfkn3.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17394"; mail-complaints-to="usenet@ciao.gmane.io" Cc: manuel@ledu-giraud.fr, morgan@ice9.digital, emacs-devel@gnu.org, visuweshm@gmail.com To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 23 17:35:49 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 1ssl6K-0004KG-KF for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 17:35:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssl65-0008Gu-M2; Mon, 23 Sep 2024 11:35:33 -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 1ssl64-0008GS-1m for emacs-devel@gnu.org; Mon, 23 Sep 2024 11:35:32 -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 1ssl63-0003Tx-Ot; Mon, 23 Sep 2024 11:35:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9LgxRqgbYN6tMxZTJLot0FQ2HcW85sfOTSsnDdz8krk=; b=lL3gVyO586vp s4mlkzdj3VkelZlneHPIrZu/3n5FeHs+Wz2AXcGhHNaEVMiqJT9Cju++dJLKUw8VGlpUCSnhpQJfq y0dabUDAk5WG5ZXWd9w7QQVmE4j/l8Ty5aDdMTUYxJeGPXzhEhlcfmmiwo1ehbjs/rkLesa1BCRpq Nt2Js/fDONM7tm6RTMi6OqhiIleDwibsQ2wTzZ+5SYEDtPbo/np6z3Ab+mhSqwlLOYF07qznC5rvk HovAXMon69+/3T9ciW99QzBmUh0kcfcOAZjTg9qH5w8FC9fvKk7uUa7fAJ+r9YZFfdto3UyaTGMRQ qZfHKR7ZosPRuYBaLxpDIQ==; In-Reply-To: <87msjyv2xb.fsf@gnu.org> (message from Tassilo Horn on Mon, 23 Sep 2024 16:51:28 +0200) 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:323968 Archived-At: > From: Tassilo Horn > Cc: Manuel Giraud , morgan@ice9.digital, > emacs-devel@gnu.org, visuweshm@gmail.com > Date: Mon, 23 Sep 2024 16:51:28 +0200 > > > Should we perhaps define suitable settings for this face in the themes > > that come with Emacs? > > I think the problem is much more likely when using a dark theme, so > those could define black foreground and white background for > doc-view-svg-face. But since there are so many popular dark themes > outside of emacs, I doubt that's a good idea. OK. > In the end, if the theming of the PDF/SVG gives suitable results depends > on the PDF and we have no way to test if it does for the one at hand. > So I'd rather apply something like that to the emacs-30 branch: > > --8<---------------cut here---------------start------------->8--- > diff --git a/lisp/doc-view.el b/lisp/doc-view.el > index 15352630d25..667b0e12986 100644 > --- a/lisp/doc-view.el > +++ b/lisp/doc-view.el > @@ -238,10 +238,21 @@ 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. This part is okay. > 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. Also, I thought we agreed to also have some text in NEWS to delineate this issue. Thanks.