From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22780: 25.1.50; wrong average width picked for bold face for 7x13 X11 font Date: Wed, 15 Mar 2017 17:39:32 +0200 Message-ID: <83wpbqa6rv.fsf@gnu.org> References: <1cnsT0-0000ii-Ph@gedanken.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1489592477 10206 195.159.176.226 (15 Mar 2017 15:41:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2017 15:41:17 +0000 (UTC) Cc: 22780@debbugs.gnu.org, alex@khesin.com To: gnubugs@gedanken.org.uk (Andrew M. Bishop), Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 15 16:41:11 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 1coB2y-0001fB-1L for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Mar 2017 16:41:08 +0100 Original-Received: from localhost ([::1]:38068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coB32-00047t-Jx for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Mar 2017 11:41:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coB2w-00047c-M6 for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2017 11:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coB2s-0003ew-Ok for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2017 11:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1coB2s-0003en-II for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2017 11:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1coB2r-00075I-Ra for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2017 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Mar 2017 15:41: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.148959242027168 (code B ref 22780); Wed, 15 Mar 2017 15:41:01 +0000 Original-Received: (at 22780) by debbugs.gnu.org; 15 Mar 2017 15:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:57354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coB2B-000748-R2 for submit@debbugs.gnu.org; Wed, 15 Mar 2017 11:40:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coB29-00073w-PN for 22780@debbugs.gnu.org; Wed, 15 Mar 2017 11:40:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coB23-0003Ag-MK for 22780@debbugs.gnu.org; Wed, 15 Mar 2017 11:40:12 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coB1x-00034s-TK; Wed, 15 Mar 2017 11:40:05 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1242 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1coB1w-0008R9-AQ; Wed, 15 Mar 2017 11:40:05 -0400 In-reply-to: <1cnsT0-0000ii-Ph@gedanken.org.uk> (gnubugs@gedanken.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:130616 Archived-At: > From: gnubugs@gedanken.org.uk (Andrew M. Bishop) > Date: Tue, 14 Mar 2017 19:50:40 +0000 > Cc: alex@khesin.com > > 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. I'm CC'ing Handa-san who was involved in solving that bug. Reverting the solution for that bug is clearly not TRT, but I hope Handa-san will have comments about your particular problem. Thanks.