From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh 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 15:06:50 +0530 Message-ID: <87ldziyaml.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12000"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Morgan Willcock , emacs-devel@gnu.org, Eli Zaretskii To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 23 11:37:42 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 1ssfVm-0002zo-MS for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 11:37:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssfV7-000486-2G; Mon, 23 Sep 2024 05:37:01 -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 1ssfV5-00040v-9n for emacs-devel@gnu.org; Mon, 23 Sep 2024 05:36:59 -0400 Original-Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssfV3-0007hA-P6; Mon, 23 Sep 2024 05:36:59 -0400 Original-Received: by mail-pf1-x441.google.com with SMTP id d2e1a72fcca58-718d704704aso3564030b3a.3; Mon, 23 Sep 2024 02:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727084215; x=1727689015; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C60IJOjzkDS459cJR/3GTHgEOVEysEoR3Xvv0r+uDWE=; b=e/8KgGQIBBNr5AZ7iFkQaIg0pLHJC51nxUu1ROb4WIQBDPuIj3nF7CO1fdSr4Bub5M FXf3trYAtOZ1A59KnECjzre54b/qYdrXgOJS2tkBTceE5aV+m9VpFIrD1CTH/+0qaCF/ WWBLGYYyHA6BITRpuZtAHR0Ki1KkzJHcPEIqzNGzWitbWnrfzQjh6vSQsCKnsO+BSynM bAFjo25ksk3HrqeOUQXGTuxaESOQ6D9W9tvSWlokipa7VVeiDZanurpScyKOcpfui84c YogRNDL/dIVZrQ/jLi/yDakbXOKcKdamcjbTSFsT0OqqslVNKlJmdwbcMT2SNAH8IQBu 8BPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727084215; x=1727689015; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=C60IJOjzkDS459cJR/3GTHgEOVEysEoR3Xvv0r+uDWE=; b=AmtybQ2bEl0rxCCcHGRan6Grvm9B9TXASJ+TUTpze4lgNN4nlrpYY/dMSxSBBOAR6X 3HvTxVleskk6bDKwbsK/Yjc86B/LV2idNaZ9D2YzigBMgnBChcaSZDqsbd6URxRGaBg8 wDJRz1DvG2PQwWiCEQVtk/C1PHvBVAn0MPzFxo1lW5fGqCnhhnMkhzNsBaCe5TgO2sNq 7h0qb7FyzX4LwXeGKYCRdm+X+b+z92rYMuWzAozR3DNgFrc115vfQkVt9m78qc8QGna1 13UGNSWlyRzflRtHexe2psRA6l26Z6l05DZbbe6k1kCup3RNCny3vly0r/Z6sPiZVz8I zuLg== X-Forwarded-Encrypted: i=1; AJvYcCUGb2Z30Mrsyw7/9qIS005OoJp8o2pvN7sTpDeFicjg7L+NIFa2mfMxH7bLNYFqiGx53hcMITgC+n1yxFU=@gnu.org, AJvYcCWYejnCvY7z7yKh1m8b07St4MJtaUQR0gmY2JQVt4+H2LPuINV/AAPUStHXSVVlKXhdnl8V@gnu.org X-Gm-Message-State: AOJu0YzOjcx9y80vRrBs44r+AlsFcZGmMLVLM+4YOrfuvaIY/PRyBKhe 45eC4WVa6xzAVxgvEBNPCpw9PdumIUj79tu2hzG5S4nsFWdbJHsCZuAu0Ndk X-Google-Smtp-Source: AGHT+IEYdsq4h6ZrQShfjoZtZn3sHIcamCY2B5m6nRfcH2I2QgeCTzTGbYYEksJHl4TiXxuVemGjTA== X-Received: by 2002:a05:6a00:2308:b0:718:ddd9:a8fa with SMTP id d2e1a72fcca58-7199c96d80dmr14936936b3a.16.1727084214456; Mon, 23 Sep 2024 02:36:54 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944abe4casm13517516b3a.87.2024.09.23.02.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 02:36:54 -0700 (PDT) In-Reply-To: <8734lqzx64.fsf@gnu.org> (Tassilo Horn's message of "Mon, 23 Sep 2024 08:44:35 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x441.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:323949 Archived-At: [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 23, 2024] Tassilo Horn wrote: > 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? > >> Would that be what a regular PDF viewer does? > > It seems so. AFAIU, the "dark-mode" PDF viewers offer has a lot that goes into it especially wrt making images actually viewable. Since we don't do any such complex handling (nor do we instruct mutool to do it), we present an unreadable document in this case. I believe it would be best to default the face to be black-on-white, and let the user customise the face to match whatever colour they want at their own risk. > Bye, > Tassilo