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 14:55:01 +0300 Message-ID: <864j66h9ey.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37196"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 13:55:45 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 1sshfN-0009WD-83 for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 13:55:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sshem-0001VK-Sf; Mon, 23 Sep 2024 07:55:08 -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 1sshel-0001Ut-Hw for emacs-devel@gnu.org; Mon, 23 Sep 2024 07:55:07 -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 1sshek-0008Ez-50; Mon, 23 Sep 2024 07:55:06 -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=YnDuSO7GcWNYn59iN/HyfgobQDbo3Pg0fMHzQyzXe10=; b=TpjAXrfMUQsh IatLcA104xTDbkTGpn/lGGQix6XY+rNIa3AxtBwARXk7txVpeVbCjIwbxlCVVbeM0/w2b0VFNt8E2 vtlqDuFxrRJ/ATrJtzazZSY4dI4tED8sxK8AIoZfC0DI1fe54C9m+MT1fe/mmC6Nw7CuX8lDOEudM wdEscjnl5mmjyDwdKnzAbRaYJLgKfzr5mofo8xjH9Kmyn8G+rnvaC8CjZyMIiLuQRhy0ekvrDEU2Q I59EzmltD5Y0qYNsb3ZBMM+qMIbPe2v6H9NuyDnstTe/hH5H08d8bWeIg716V6xTKibX8DlzTv91u DbAIWpNwSqNF8c9pk8oQRg==; In-Reply-To: <8734lqzx64.fsf@gnu.org> (message from Tassilo Horn on Mon, 23 Sep 2024 08:44:35 +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:323956 Archived-At: > From: Tassilo Horn > Cc: emacs-devel@gnu.org, Eli Zaretskii , visuweshm@gmail.com > Date: Mon, 23 Sep 2024 08:44:35 +0200 > > Morgan Willcock writes: > > > When looking at the SVG files in the location browsed by > > doc-view-dired-cache I can see that the Azure invoice has: > > > > - A transparent background with black and grey text on it. > > - A dark grey border with white text on it. > > - A white border with black text on it. > > > > The transparent background is shown as white or black, depending on > > whether the light or dark theme is loaded, but the text is always > > readable because the text colour complements the background. > > > > The problem is the text that is not on the transparent area of the > > document, presumably because a coloured border cannot be identified as > > being part of the background and so the border colours will never > > follow the theme. > > > > Based on my usage, setting doc-view-mupdf-use-svg to t seems to make > > reading PDF documents significantly more difficult. > > > > Perhaps there should be an option to just assume a white background > > and render using the original colours, and turn that on by default. > > That's what Visuwesh's advice of setting doc-view-svg-face's > foreground/background to black and white would do. We could do that by > default instead of inheriting from the default face (which is modified > by the theme). That would probably give sensible results in most cases. > > I've also tried un-inheriting doc-view-svg-face from the default face so > that it is the empty face, i.e., all its attributes are nil. In that > case, it looks exactly as if it inherited from the default face, i.e., > the document is styled according to the theme with the same problems for > certain files as you see. > > I've also created a PDF with blue background and different text colors. > In that case, doc-view-svg-face set to "black on wide" doesn't seem to > have any effect. The foreground/background colors of the document > appear exactly as I've specified them in the original LaTeX document and > as the Evince or mupdf PDF viewer show them, too. > > Eli, what do you think? Sorry, I don't understand what you are asking me about. Please elaborate It sounds like PDF documents with colors have inherent problems with doc-view-mupdf-use-svg and/or themes, so maybe we should warn about this in NEWS and in the doc string, and suggest that people either customize the doc-view-svg-face, or disable doc-view-mupdf-use-svg.