From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tomasz Piotrowski Newsgroups: gmane.emacs.bugs Subject: bug#37159: 26.1; svg images in eww Date: Mon, 09 Sep 2019 17:20:21 +0200 Message-ID: <87woehmr7u.fsf@potas.fizyka.umk.pl> References: <87ftlsoxco.fsf@host-4-24.fizyka.umk.pl> <87mufzbxit.fsf@gnus.org> <87a7bz809e.fsf@is.umk.pl> <87tva594me.fsf@gnus.org> <87d0gtg3z0.fsf@is.umk.pl> <83v9ulhf49.fsf@gnu.org> <87r259hdhr.fsf@is.umk.pl> <83sgpphd06.fsf@gnu.org> <877e707cdh.fsf@gnus.org> <83v9ukfjum.fsf@gnu.org> <87sgpo4b80.fsf@gnus.org> <83r258fj6o.fsf@gnu.org> <87zhjv2iwn.fsf@gnus.org> <83o90bdp7b.fsf@gnu.org> <87lfv42jcu.fsf@potas.fizyka.umk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116758"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.3.1; emacs 26.2 To: Eli Zaretskii , Lars Ingebrigtsen , 37159@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 09 17:21:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i7LTd-000UC9-7O for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Sep 2019 17:21:13 +0200 Original-Received: from localhost ([::1]:58010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7LTb-000506-UA for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Sep 2019 11:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52571) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7LTT-0004zb-RT for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2019 11:21:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7LTS-0005RM-KW for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2019 11:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7LTS-0005R9-H1 for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2019 11:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i7LTS-0000h2-C3 for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2019 11:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomasz Piotrowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Sep 2019 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37159 X-GNU-PR-Package: emacs Original-Received: via spool by 37159-submit@debbugs.gnu.org id=B37159.15680424332576 (code B ref 37159); Mon, 09 Sep 2019 15:21:02 +0000 Original-Received: (at 37159) by debbugs.gnu.org; 9 Sep 2019 15:20:33 +0000 Original-Received: from localhost ([127.0.0.1]:40414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7LSz-0000fT-7F for submit@debbugs.gnu.org; Mon, 09 Sep 2019 11:20:33 -0400 Original-Received: from mail.fizyka.umk.pl ([158.75.5.252]:48074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7LSu-0000f2-Ut for 37159@debbugs.gnu.org; Mon, 09 Sep 2019 11:20:29 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.fizyka.umk.pl (Postfix) with ESMTP id 1C857A0899; Mon, 9 Sep 2019 17:20:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at fizyka.umk.pl Original-Received: from mail.fizyka.umk.pl ([127.0.0.1]) by localhost (mail.fizyka.umk.pl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zPwCauRsiL7R; Mon, 9 Sep 2019 17:20:22 +0200 (CEST) Original-Received: from potas.fizyka.umk.pl (potas.fizyka.umk.pl [158.75.4.13]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.fizyka.umk.pl (Postfix) with ESMTPSA id 121E1A0847; Mon, 9 Sep 2019 17:20:22 +0200 (CEST) In-reply-to: <87lfv42jcu.fsf@potas.fizyka.umk.pl> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166331 Archived-At: I found a workaround for this bug on my system: the default theme (with whi= te background) is able to render Wikipedia's pages with SVG equations properly. Then, using "heaven-and-hell" package for theme toggling, I switch to the default theme when using eww. For those experiencing the same problem, here is the relevant configuration snippet (my default theme is "sourcerer", and I use to toggle themes): (setq heaven-and-hell-theme-type 'dark) (setq heaven-and-hell-themes '((light) (dark . sourcerer))) (setq heaven-and-hell-load-theme-no-confirm t) (add-hook 'after-init-hook 'heaven-and-hell-init-hook) (global-set-key (kbd "") 'heaven-and-hell-toggle-theme) Tomasz Tomasz Piotrowski writes: > Hi, > > What are the plans regarding resolving this bug? > > Tomasz > > > > > Tomasz Piotrowski writes: > >> Well, my opinion on this is that either I have to keep switching to Chro= me to use wikipedia, or I could use eww for my work. I don=E2=80=99t know h= ow many others have the same issue, but it is a serious flaw in eww from my= point of view. Many thanks to Lars for pinpointing the reason of certain s= vg images not rendering properly in eww. >> >> Tomasz >> >> >> >> Wiadomo=C5=9B=C4=87 napisana przez Eli Zaretskii w dniu 2= 7.08.2019, o godz. 09:47: >> >>>> From: Lars Ingebrigtsen >>>> Cc: tpiotrowski@is.umk.pl, 37159@debbugs.gnu.org >>>> Date: Tue, 27 Aug 2019 08:59:20 +0200 >>>>=20 >>>> I'm not quite sure what a solution here would be. shr could parse the >>>> SVG data (it's just XML, after all) and insert a stroke (i.e., >>>> foreground) colour if none is specified, and one that's sufficiently >>>> different from the background colour that the image would be kinda-sor= ta >>>> readable. >>>>=20 >>>> But is it worth it just to display these unusually degenerate SVG >>>> images? >>>=20 >>> I don't know enough to have an opinion that matters. >>>=20 >>>>> Btw, why does EWW break the text line when it encounters an image? >>>>=20 >>>> When doing the layout, in general the dimensions of the images isn't >>>> known -- the images are fetched asynchronously after displaying the >>>> text. >>>>=20 >>>> There's also a historical reason -- the code was written before shr did >>>> pixel-based layouts, so even if it knew the dimensions, it couldn't do >>>> anything about it. That could be fixed now (so that if the has a >>>> width attribute, the layout engine could use it and insert the >>>> placeholder there). >>>=20 >>> Something to work on in the future, I think. >>>=20 >>> Thanks.