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: Sun, 22 Sep 2024 21:57:02 +0100 Message-ID: <87plovmmox.fsf@ice9.digital> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19526"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Tassilo Horn To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 22 22:58:06 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 1ssTee-0004sC-Bi for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Sep 2024 22:58:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssTdu-0006mG-8W; Sun, 22 Sep 2024 16:57:18 -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 1ssTdq-0006lm-4l for emacs-devel@gnu.org; Sun, 22 Sep 2024 16:57:14 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssTdk-0007Zq-UW; Sun, 22 Sep 2024 16:57:12 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D49660004; Sun, 22 Sep 2024 20:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1727038623; 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=4/T6aX2Me9RjL2aNHW4E4kJN15RzvmT7NumPDC9HjFc=; b=bagtnPG9xGE21cuixJT93jn3FHVzM0ToL+I8m3kz1l15YULX4QU/EoOkRZhegKW/s1ssuV TR9tiQvZnkhiBgNV155ncKB+O9fGISwAs7KC+cEqmDn1VUKugUCO79Q/qvnATRTuJRyumg hFUgIeYyXGLn5gb1XqtzKFnQcnrW/3W9p2fguz9dn3jR5dg7tVrgf4dS6W8MmuMODdG3Mn H08x7S8DoN9JkKdPvAuaHtDVbRyUCMlIVEPhNvwzRPRjJZMfU3JfyapNk4lcpCryBcDb6v ghOnvgJI5Z8ZTxPWuRm8O0LUiTcIoAqbc69OuCzKaVhK5y1k56g2aYSdhW0EXA== In-Reply-To: <87msk0oqoq.fsf@gnu.org> (Tassilo Horn's message of "Sat, 21 Sep 2024 19:35:33 +0200") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=217.70.183.195; envelope-from=morgan@ice9.digital; helo=relay3-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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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:323936 Archived-At: Tassilo Horn writes: > Since doc-view-svg-face inherits from the default theme, in theory the > SVG should be adjusted acording to your theme. >> If the SVG rendering is enabled (when available) by default, does this >> mean that it is the user's responsibility to set usable default >> colours? Or should the theme be setting usable default colours? > > The latter. If the theme sets the default face sensibly (which it > surely does), then your PDFs should look the same. Well, and that's > true for "normal" PDF documents (black on white, e.g., academic papers) > but somehow fails for "fancy" documents. > > I don't know how the :foreground/:background SVG image properties work > but it looks to me as if :background works well every time but > :foreground doesn't as soon as the text is not black. I suspect the > heuristic is something like: if it's transparent, it's the background, > and if it's either black or white, it's the foreground. 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. Would that be what a regular PDF viewer does? -- Morgan Willcock