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: Tue, 30 Dec 2014 01:44:54 -0800 Message-ID: <87mw65momt.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 1419934456 24705 80.91.229.3 (30 Dec 2014 10:14:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2014 10:14:16 +0000 (UTC) To: 19117@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 30 11:14: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 1Y5toY-0000vH-NY for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Dec 2014 11:14:10 +0100 Original-Received: from localhost ([::1]:36412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5toX-0007AK-TC for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Dec 2014 05:14:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5toU-0007AF-MX for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 05:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5toR-0006YJ-FE for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 05:14:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5toQ-0006Wu-VG for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 05:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y5toQ-0006Nu-JM for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 05:14: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: Tue, 30 Dec 2014 10:14: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.141993441724502 (code B ref 19117); Tue, 30 Dec 2014 10:14:02 +0000 Original-Received: (at 19117) by debbugs.gnu.org; 30 Dec 2014 10:13:37 +0000 Original-Received: from localhost ([127.0.0.1]:60729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5to0-0006N7-NO for submit@debbugs.gnu.org; Tue, 30 Dec 2014 05:13:36 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:37849) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5tny-0006Mw-JD for 19117@debbugs.gnu.org; Tue, 30 Dec 2014 05:13:35 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0BD57209C2 for <19117@debbugs.gnu.org>; Tue, 30 Dec 2014 05:13:34 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 30 Dec 2014 05:13:34 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=3rOtuHDRyYT0 h5MoebeuvyXbuUA=; b=pKzxwwCBzNKVrIIisqQxTZHrHwBrXL33837egwxxVT+b 7fkWYTfkkvYx8rb3Gek8rVDTbIuFar5lVLn5x+pZufhxNjlSzb2dQ947h3ANzUOt bvv1vgXtZ9n1Wd6Urk38Xys3gKikVNo1Y67TpIySdstwA3QSGpl1Q1fe8/lCuag= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=3rOtuHDRyYT0h5MoebeuvyXbuUA=; b=nhd/q6CcczNBS9k8QKac +azk1EtLhvxT4jF/JK6Lw6JxcWwd/38aLKp6oSUOf7xiMxOzKwdfB9KDPrl0BaEs g1XNzrm/sT7q96SW5eW7ZrqIBCcyPw8+toDfrvGXkvjduHbxAGpiz3HhoHUxHQCF 6Y3/1c9IHE0J+GDjNrzxdoc= X-Sasl-enc: i8LX/EyM3/SKne1pqT6g3MKr8Dz36mcz950WU6I8FUhy 1419934413 Original-Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 93978680118 for <19117@debbugs.gnu.org>; Tue, 30 Dec 2014 05:13:33 -0500 (EST) Original-Received: from dima by shorty.local with local (Exim 4.84) (envelope-from ) id 1Y5tnu-0001D4-MC for 19117@debbugs.gnu.org; Tue, 30 Dec 2014 02:13:30 -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:97830 Archived-At: Hi. I looked at this some more. The scalable-fonts-allowed is indeed being set to t in realize_basic_faces(). As emacs runs, the font lists are generated (xfont_list() called) multiple times, and there are many code paths that end up doing that. Some code paths go through realize_basic_faces(), and thus allow scalable fonts, and some code paths do NOT go through that function. Each time a new emacs frame is created, xfont_list() is called multiple times, and if the last time it is called, the code path went through realize_basic_faces(), then I get the wrong fonts chosen for that frame. This is not consistent, so sometimes I see the bad behavior. What's the best route from here? Options: 1. Look at all the (very numerous, and complicated) code paths, and set it up such that realize_basic_faces() is never the last one. I don't know enough to do this (yet), and can't tell if this is even appropriate 2. Do not set scalable-fonts-allowed to t in realize_basic_faces(). Does anybody know why this is desirable? 3. Never choose scalable X fonts, regardless of scalable-fonts-allowed. If the X scalable fonts are simply scaled bitmaps, then the scaled result will never look particularly good, so choosing these is not useful. This almost certainly doesn't apply to the other font backends (xft, etc)