From unknown Wed Jun 18 23:09:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40508 <40508@debbugs.gnu.org> To: bug#40508 <40508@debbugs.gnu.org> Subject: Status: 26.2; shr does not make h1 tag larger if variable-pitch font is set Reply-To: bug#40508 <40508@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:09:49 +0000 retitle 40508 26.2; shr does not make h1 tag larger if variable-pitch font= is set reassign 40508 emacs submitter 40508 ndame severity 40508 normal tag 40508 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 10:37:49 2020 Received: (at submit) by debbugs.gnu.org; 8 Apr 2020 14:37:49 +0000 Received: from localhost ([127.0.0.1]:52787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMBpt-00060V-5F for submit@debbugs.gnu.org; Wed, 08 Apr 2020 10:37:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:40477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMBpq-00060N-5r for submit@debbugs.gnu.org; Wed, 08 Apr 2020 10:37:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52444) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMBpp-0006un-4S for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:37:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: **** X-Spam-Status: No, score=4.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_RP_RNBL,SPOOFED_FREEMAIL autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMBpo-0007Rs-3N for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:37:44 -0400 Received: from fmfe36.onbox.hu ([46.107.16.241]:36393 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jMBpn-0007RM-Sd for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:37:44 -0400 X-fm-smtp-source: yes Received: from localhost (localhost [84.236.72.86]) by web-out.onbox.hu (Postfix) with SMTP id 48y6Lq6rmNz145d for ; Wed, 8 Apr 2020 16:37:35 +0200 (CEST) From: ndame Message-ID: Subject: 26.2; shr does not make h1 tag larger if variable-pitch font is set MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_106617_38439590.1586356330304" To: "bug-gnu-emacs@gnu.org" X-AccountId: 57978162 X-Originating-Ip: 84.236.72.86 Date: Wed, 8 Apr 2020 16:37:35 +0200 (CEST) X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudejgdejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdcuhfftgffgofetkffnnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffkufggtgfvihffsegrtdersgdttdejnecuhfhrohhmpehnuggrmhgvuceovghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuheqnecukfhppeekgedrvdefiedrjedvrdekieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopedpihhnvghtpeekgedrvdefiedrjedvrdekiedpmhgrihhlfhhrohhmpegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhupdhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.241 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: If you change the font of the default variable-pitch face (set-face-font 'variable-pitch "Arial-15") then shr renders h1 tags as regular size text. Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (emacsuser[at]freemail.hu) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 HTML_MESSAGE BODY: HTML included in message -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) ------=_Part_106617_38439590.1586356330304 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If you change the font of the default variable-pitch face (set-face-font 'variable-pitch "Arial-15") then shr renders h1 tags as regular size text. This is because variable-pitch is listed first in the face=C2=A0 setting an= d if it is set with size then it overrides the settings coming later: (defun shr-tag-h1 (dom) =C2=A0 (shr-heading dom (if shr-use-fonts =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(variable-pitc= h (:height 1.3 :weight bold)) =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 'bold))) =C2=A0 ------=_Part_106617_38439590.1586356330304 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit If you change the font of the default variable-pitch face

(set-face-font 'variable-pitch "Arial-15")

then shr renders h1 tags as regular size text.

This is because variable-pitch is listed first in the face  setting and
if it is set with size then it overrides the settings coming later:

(defun shr-tag-h1 (dom)
  (shr-heading dom (if shr-use-fonts
               '(variable-pitch (:height 1.3 :weight bold))
             'bold)))
  ------=_Part_106617_38439590.1586356330304-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 17 10:24:27 2020 Received: (at 40508) by debbugs.gnu.org; 17 Jul 2020 14:24:27 +0000 Received: from localhost ([127.0.0.1]:57857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwRHn-0000PT-Io for submit@debbugs.gnu.org; Fri, 17 Jul 2020 10:24:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwRHl-0000PF-D2 for 40508@debbugs.gnu.org; Fri, 17 Jul 2020 10:24:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dc2NiozPnTtYrJIi5jh64MALRyoK/k5NPt6jvA07Gho=; b=KF7YR9fpKFlCgar9r6uFMlwzpy b4elXbZTH6EjMCa2XxstQ4AONzeFT3ufLctcW2ETu/9yUrtZJh0bNvuQRoKX6yaHW61YtnSjfDMs0 h5oXngABeJISbhsH4mIEKsyKjumIy6Ws8eNvE5dczFVGcvcVqzPVQd+xHXvqjtIMMB/E=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwRHb-0004xI-Hx; Fri, 17 Jul 2020 16:24:19 +0200 From: Lars Ingebrigtsen To: ndame Subject: Re: bug#40508: 26.2; shr does not make h1 tag larger if variable-pitch font is set References: Date: Fri, 17 Jul 2020 16:24:14 +0200 In-Reply-To: (ndame's message of "Wed, 8 Apr 2020 16:37:35 +0200 (CEST)") Message-ID: <87zh7ymd81.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: ndame writes: > If you change the font of the default variable-pitch face > > (set-face-font 'variable-pitch "Arial-15") > > then shr renders h1 tags as regular size text. > > This is because variable-pitch is list [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40508 Cc: 40508@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ndame writes: > If you change the font of the default variable-pitch face > > (set-face-font 'variable-pitch "Arial-15") > > then shr renders h1 tags as regular size text. > > This is because variable-pitch is listed first in the face setting and > if it is set with size then it overrides the settings coming later: > > (defun shr-tag-h1 (dom) > (shr-heading dom (if shr-use-fonts > '(variable-pitch (:height 1.3 :weight bold)) > 'bold))) Would reversing the order fix this problem? Untested patch below. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d6bdb4c17e..ea74316a74 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1916,7 +1916,7 @@ shr-tag-span (defun shr-tag-h1 (dom) (shr-heading dom (if shr-use-fonts - '(variable-pitch (:height 1.3 :weight bold)) + '((:height 1.3 :weight bold) variable-pitch) 'bold))) (defun shr-tag-h2 (dom) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 29 03:49:59 2020 Received: (at 40508) by debbugs.gnu.org; 29 Jul 2020 07:49:59 +0000 Received: from localhost ([127.0.0.1]:59956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0gqc-0004so-Tg for submit@debbugs.gnu.org; Wed, 29 Jul 2020 03:49:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0gqZ-0004sN-31 for 40508@debbugs.gnu.org; Wed, 29 Jul 2020 03:49:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hfHsxUSIN+6WS61OIo8HueUlCa4thxBbHJ94MmEoAnc=; b=DIeS6ip/XILNcFUQBMSUMmVdT6 eEvoKj6LDJG9HbG0jp+gIk9YL/w2KOX0pBD2LWFHvPZt8QUOHkvoJExlHlIpFUyuFaqDfp/Dl0ssr pX/i8b7U8u+TBKoLYep9OyHCjq4JOeL/T0DTqKIS5mq3M7XdvEisZqvDU6dEZAMUPw+Y=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0gqQ-0003q6-3F; Wed, 29 Jul 2020 09:49:48 +0200 From: Lars Ingebrigtsen To: ndame Subject: Re: bug#40508: 26.2; shr does not make h1 tag larger if variable-pitch font is set In-Reply-To: <87zh7ymd81.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 17 Jul 2020 16:24:14 +0200") References: <87zh7ymd81.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Wed, 29 Jul 2020 09:49:44 +0200 Message-ID: <87eeou221z.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: >> This is because variable-pitch is listed first in the face setting and >> if it is set with size then it overrides the settings coming later: >> >> (defun shr-tag-h1 (dom) >> (shr-heading dom (if s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40508 Cc: 40508@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: >> This is because variable-pitch is listed first in the face setting and >> if it is set with size then it overrides the settings coming later: >> >> (defun shr-tag-h1 (dom) >> (shr-heading dom (if shr-use-fonts >> '(variable-pitch (:height 1.3 :weight bold)) >> 'bold))) > > Would reversing the order fix this problem? Untested patch below. Well, no, and the order isn't the problem at all -- it's that if you set the font that way in a face, it doesn't really matter what else you add to the spec afterwards, as far as I can see. If what you were trying to achieve was to make the face bigger, then you can increase the size by (for instance) 20% with this: (set-face-attribute 'variable-pitch nil :height 120) So this isn't an eww bug, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 29 03:50:06 2020 Received: (at control) by debbugs.gnu.org; 29 Jul 2020 07:50:06 +0000 Received: from localhost ([127.0.0.1]:59961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0gqk-0004tl-5E for submit@debbugs.gnu.org; Wed, 29 Jul 2020 03:50:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0gqi-0004sp-9P for control@debbugs.gnu.org; Wed, 29 Jul 2020 03:50:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=agkHck7aqbcocSwPCKi3cH508gVwxEdU7kQEsYKyLJM=; b=qSbJfXkfQ4hKGZIMl5Os2E3St0 GUT7QfCAHg5pX+lOxAPoS7AZQ/19ncUbfubfKxx9obtNjELlNW8ZZrG36Pb4/csqf4OxhEQCMmgz3 AgdBcwxm81ob7mQxdI7Drzrl1TJNOz5mvzwX86sz/gcJW4h2BsbGh9Re4zGnf1LsbWLM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0gqa-0003qD-EN for control@debbugs.gnu.org; Wed, 29 Jul 2020 09:49:58 +0200 Date: Wed, 29 Jul 2020 09:49:55 +0200 Message-Id: <87d04e221o.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #40508 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 40508 notabug close 40508 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 40508 notabug close 40508 quit From unknown Wed Jun 18 23:09:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Aug 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator