From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes Date: Sat, 27 Dec 2014 01:17:26 -0800 Message-ID: <8761cxigri.fsf@secretsauce.net> References: <878uj674zh.fsf@secretsauce.net> <831tox7t03.fsf@gnu.org> <87a92zrj4b.fsf@secretsauce.net> <83egsbzbfu.fsf@gnu.org> <87r3vykdse.fsf@secretsauce.net> <87ppbikb6g.fsf@secretsauce.net> <54944426.6090900@yandex.ru> <878ui3jkx0.fsf@secretsauce.net> <5497D623.7040406@swipnet.se> <87bnmqi1ps.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419672557 1611 80.91.229.3 (27 Dec 2014 09:29:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Dec 2014 09:29:17 +0000 (UTC) Cc: 19117@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 27 10:29:11 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y4ngN-0007ck-7j for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Dec 2014 10:29:11 +0100 Original-Received: from localhost ([::1]:55417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ngM-0002K5-GW for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Dec 2014 04:29:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ngI-0002EQ-8B for bug-gnu-emacs@gnu.org; Sat, 27 Dec 2014 04:29:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4ngF-0001a2-2w for bug-gnu-emacs@gnu.org; Sat, 27 Dec 2014 04:29:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ngE-0001Zw-PK for bug-gnu-emacs@gnu.org; Sat, 27 Dec 2014 04:29:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4ngE-0002jJ-EE for bug-gnu-emacs@gnu.org; Sat, 27 Dec 2014 04:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Dec 2014 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19117-submit@debbugs.gnu.org id=B19117.141967248910334 (code B ref 19117); Sat, 27 Dec 2014 09:29:02 +0000 Original-Received: (at 19117) by debbugs.gnu.org; 27 Dec 2014 09:28:09 +0000 Original-Received: from localhost ([127.0.0.1]:58581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4nfM-0002ga-R4 for submit@debbugs.gnu.org; Sat, 27 Dec 2014 04:28:09 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57586) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4nfJ-0002gJ-AM for 19117@debbugs.gnu.org; Sat, 27 Dec 2014 04:28:06 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 70BC9206F9 for <19117@debbugs.gnu.org>; Sat, 27 Dec 2014 04:28:03 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 27 Dec 2014 04:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=2dYmuv9+ELB3 /osEIn0iAGl5OaA=; b=tA+54RN/8+1mhRKcIU8xuNsFoV2TYT6FMKwQ+72SsU/5 NIfmFHqwTDT0FKYgkAPDyoqwpzDte5ceAfwFa6HQVSo582i4katUP53od2n//Ln8 hRS/bNShJYo/usApeRUOITOoimJS8YAaRlba0sMQguQvLE+isNHD1JCzqHV93SU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=2dYmuv9+ELB3/osEIn0iAGl5OaA=; b=oBmnwHmieBDOIrW8Nqjm YFD/jnFS/0PcxCUg4kkAZQDj3dKosG3Ln4hW0yZO2RamtoHyf1IN3P/SfQFquRkk Psep8vU3chM99L+4I8r94IEDkQShtujpiwVE/W3nChtrL+dcKere5FNEVrwJdrb/ HZE+ZRE+6agjzvLs0cP97F4= X-Sasl-enc: x5lbNpkfLTkEcw78JqvNTvasQsX6w7+PfJtp0nbQxPX/ 1419672483 Original-Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 125E8C0027F; Sat, 27 Dec 2014 04:28:03 -0500 (EST) Original-Received: from dima by shorty.local with local (Exim 4.84) (envelope-from ) id 1Y4nfF-00016H-Rl; Sat, 27 Dec 2014 01:28:01 -0800 In-reply-to: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97758 Archived-At: Stefan Monnier writes: > IIUC if `scalable-fonts-allowed' is set to nil, that's what should happen. This was a VERY useful comment. I do not touch scalable-fonts-allowed, so it should be the default (i.e. nil), meaning that I should already be disallowing these fonts. Looking at it deeper I see that the font list is obtained by xfont_list_pattern() in xfont.c. This is an XListFonts() call, with emacs then filtering the resulting list in various ways. I see XListFonts() return consistent results, but the post-filtering of the list is inconsistent. Specifically, the inconsistent piece is exactly the scalable_fonts_allowed check in xfont_list_pattern(): https://github.com/emacs-mirror/emacs/blob/162660c3639a68a7b71439bdd713d54f940274b8/src/xfont.c#L416 When we get here, scalable_fonts_allowed is sometimes non-nil, which is the direct cause of my problem. Forcefully removing that check and always assuming that it IS nil makes this bug go away. I haven't verified this yet, but presumably scalable_fonts_allowed is getting set to t in realize_basic_faces() in xfaces.c: https://github.com/emacs-mirror/emacs/blob/162660c3639a68a7b71439bdd713d54f940274b8/src/xfaces.c#L5236 Any comment on that? That bit of code was there since 2001, so presumably it's reasonable. Anybody know more?