From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ndame Newsgroups: gmane.emacs.bugs Subject: bug#40508: 26.2; shr does not make h1 tag larger if variable-pitch font is set Date: Wed, 8 Apr 2020 16:37:35 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_106617_38439590.1586356330304" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="83620"; mail-complaints-to="usenet@ciao.gmane.io" To: 40508@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 08 16:38:25 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jMBqQ-000LdP-Tc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Apr 2020 16:38:22 +0200 Original-Received: from localhost ([::1]:36838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMBqO-0006zS-W4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Apr 2020 10:38:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMBq7-0006yr-4U for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:38:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMBq6-0007fT-7Q for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMBq6-0007fP-4p for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMBq6-000611-0O for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ndame Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Apr 2020 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40508 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.158635666923100 (code B ref -1); Wed, 08 Apr 2020 14:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Apr 2020 14:37:49 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) X-AccountId: 57978162 X-Originating-Ip: 84.236.72.86 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-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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178139 Archived-At: ------=_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--