From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes Date: Fri, 02 Jan 2015 11:43:54 +0200 Message-ID: <838uhlbjqd.fsf@gnu.org> 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> <87mw65momt.fsf@secretsauce.net> <87lhlonc7c.fsf@secretsauce.net> <83sifwaooq.fsf@gnu.org> <87h9wcmpaf.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1420191919 25001 80.91.229.3 (2 Jan 2015 09:45:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2015 09:45:19 +0000 (UTC) Cc: 19117@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 02 10:45:12 2015 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 1Y6yn9-0005aJ-Vl for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2015 10:45:12 +0100 Original-Received: from localhost ([::1]:50704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6yn8-00068i-Vg for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2015 04:45:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6yn5-00067B-1s for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2015 04:45:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6yn0-0006mu-SR for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2015 04:45:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6yn0-0006mW-Ox for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2015 04:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y6yn0-0005vF-7e for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2015 04:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Jan 2015 09:45: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.142019184422671 (code B ref 19117); Fri, 02 Jan 2015 09:45:02 +0000 Original-Received: (at 19117) by debbugs.gnu.org; 2 Jan 2015 09:44:04 +0000 Original-Received: from localhost ([127.0.0.1]:34813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6ym3-0005ta-FF for submit@debbugs.gnu.org; Fri, 02 Jan 2015 04:44:03 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:48818) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6ylz-0005sy-Km for 19117@debbugs.gnu.org; Fri, 02 Jan 2015 04:44:01 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NHJ00B00MVN5400@mtaout28.012.net.il> for 19117@debbugs.gnu.org; Fri, 02 Jan 2015 11:41:50 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHJ000FEMXQHTA0@mtaout28.012.net.il>; Fri, 02 Jan 2015 11:41:50 +0200 (IST) In-reply-to: <87h9wcmpaf.fsf@secretsauce.net> X-012-Sender: halo1@inter.net.il 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:97936 Archived-At: > From: Dima Kogan > Cc: monnier@iro.umontreal.ca, 19117@debbugs.gnu.org > Date: Tue, 30 Dec 2014 20:06:38 -0800 > > Eli Zaretskii writes: > > >> From: Dima Kogan > >> Date: Tue, 30 Dec 2014 10:33:17 -0800 > >> Cc: 19117@debbugs.gnu.org > >> > >> I will patch xfont_list_pattern() to accept a 3rd type of > >> scalable-fonts-allowed: 'fallback where we add these fonts only if no > >> others are available, and in realize_basic_faces() I'll use THAT value. > >> Does that sound reasonable? > > > > Please note that on MS-Windows the scalable fonts were always used in > > this scenario, back with that code, and there was a comment explaining > > that otherwise too few fonts will be available on Windows. > > Hi. I'm attaching patches. The first one does this: > > scalable font logic now matches the docs and is more consistent > > A nil value of scalable-fonts-allowed allows scalable fonts if no others > were found. This is the previously-documented behavior. > > realize_basic_faces() no longer forces scalable-fonts-allowed to t. If > nil, some fonts will always be found even if only scalable fonts are > available, as set by the other part of this patch. > > This is simpler than what I proposed earlier, since it does not > introduce a third setting to scalable-fonts-allowed: the default nil > value is sufficient. The patch mimics the older behavior to loop through > the whole font list a second time if no non-scalable fonts were found > and some scalable fonts WERE found, but were skipped the first time > around due to scalable-fonts-allowed. This fixes my bug. The patch > touches many lines, but almost all of it is indentation. > > > The second patch is mostly unrelated. It removes some redundant code. > > I don't believe the behavior on Windows should be affected at all, but I > have not verified this. Thanks. I don't really know how to test these changes on Windows, since most of the changes are in xfont.c, and the equivalent w32font.c has no similar code that I could identify. And since I'm not an expert on fonts, I'm stuck. I've built Emacs with your changes and verified that x-list-fonts still returns the same number of fonts, and the buffer font selection dialog still seems to offer the same list of fonts AFAICS. Can you suggest any further way of testing the patch?