From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: gnubugs@gedanken.org.uk (Andrew M. Bishop) Newsgroups: gmane.emacs.bugs Subject: bug#22780: 25.1.50; wrong average width picked for bold face for 7x13 X11 font Date: Tue, 14 Mar 2017 19:50:40 +0000 Message-ID: <1cnsT0-0000ii-Ph@gedanken.org.uk> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489523246 15844 195.159.176.226 (14 Mar 2017 20:27:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 20:27:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: alex@khesin.com To: 22780@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 14 21:27:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnt2B-0002Jl-G3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 21:27:07 +0100 Original-Received: from localhost ([::1]:33372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnt2H-0006Wm-L5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 16:27:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnt2A-0006Wh-MI for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 16:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnt26-0001LF-F6 for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 16:27:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnt26-0001L4-3V for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 16:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnt25-00075b-NS for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 16:27:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: gnubugs@gedanken.org.uk (Andrew M. Bishop) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Mar 2017 20:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22780-submit@debbugs.gnu.org id=B22780.148952317527195 (code B ref 22780); Tue, 14 Mar 2017 20:27:01 +0000 Original-Received: (at 22780) by debbugs.gnu.org; 14 Mar 2017 20:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:56065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnt1K-00074Z-8w for submit@debbugs.gnu.org; Tue, 14 Mar 2017 16:26:14 -0400 Original-Received: from vps1.gedanken.org.uk ([176.126.246.21]:42469 helo=gedanken.org.uk) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnsT7-0006EI-9j for 22780@debbugs.gnu.org; Tue, 14 Mar 2017 15:50:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gedanken.org.uk; s=20160729; h=Message-Id:Content-Type:MIME-Version:Date:CC:Subject:To:From; bh=dUgyqcWxkpNcZOj8qAC7CX3Rq9BFo+LoaHH79S4XNqQ=; b=FEErpUYb5tuUiytJOD+H/QxoqwzNQe3s9uj3mKk6TLrsPaD+OFmJBNTp3z1JQZVsGzovdOqIuQJGoNKEE8+wdVH2AA2CzsLMGICguuViQPIECCKeoMeMQwDNREq4MOII3oF04+m6c3O5N49EflaZlq+hfNqh7JnObq2HZG7l/lE=; X-Mailman-Approved-At: Tue, 14 Mar 2017 16:26:13 -0400 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: 208.118.235.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:130599 Archived-At: I have also found this problem since I use 7x13 as my default font. The widening of the bold version of this font makes Emacs version 25 unusable by me. Using Alex Khesin's test case: $ emacs -Q --eval '(progn (set-face-font '\''default "7x13") (print (face-font "default")) (print (face-font "bold")))' I find that these fonts all work correctly (the width is the same for normal and bold versions): 6x9, 6x10, 6x12, 6x13, 7x14, 8x13, 8x16. It is only the 7x13 font that does not scale correctly since it gives different widths (80 compared to 70) for the bold compared to normal font: -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1 -misc-fixed-bold-r-normal--13-120-75-75-c-80-iso8859-1 Using 'git bisect' I traced down the change that caused it and demonstrated that it can be fixed by this patch. -------------------- src/xfaces.c patch -------------------- diff --git a/src/xfaces.c b/src/xfaces.c index 5077cb2d94..c898b7886f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5485,7 +5485,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) } if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) attrs[LFACE_FONT_INDEX] - = font_load_for_lface (f, attrs, Ffont_spec (0, NULL)); + = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]); if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) { face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]); -------------------- src/xfaces.c patch -------------------- This reverts a patch that was made as part of bug #17973. The change in src/font.c that was also made in that bug report seems to not be relevant. This is clearly a regression from Emacs 24 but since this change was made to fix another bug it might be quite difficult to find a change that works for both.