From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes Date: Fri, 19 Dec 2014 18:28:38 +0300 Message-ID: <54944426.6090900@yandex.ru> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1419002967 31286 80.91.229.3 (19 Dec 2014 15:29:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 15:29:27 +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 Dec 19 16:29:21 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 1Y1zUW-0003iG-6p for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 16:29:20 +0100 Original-Received: from localhost ([::1]:59183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1zUV-0007Qe-KD for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 10:29:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1zUL-0007PF-S5 for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 10:29:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1zUE-0002yb-Pk for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 10:29:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1zUE-0002yX-MZ for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 10:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y1zUE-0004Do-5X for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 10:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Dec 2014 15: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.141900292616206 (code B ref 19117); Fri, 19 Dec 2014 15:29:02 +0000 Original-Received: (at 19117) by debbugs.gnu.org; 19 Dec 2014 15:28:46 +0000 Original-Received: from localhost ([127.0.0.1]:51676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1zTx-0004DJ-BQ for submit@debbugs.gnu.org; Fri, 19 Dec 2014 10:28:45 -0500 Original-Received: from forward8l.mail.yandex.net ([84.201.143.141]:49603) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1zTt-0004D9-Tt for 19117@debbugs.gnu.org; Fri, 19 Dec 2014 10:28:43 -0500 Original-Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward8l.mail.yandex.net (Yandex) with ESMTP id 19FF31A410AF; Fri, 19 Dec 2014 18:28:40 +0300 (MSK) Original-Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 7144519000E0; Fri, 19 Dec 2014 18:28:39 +0300 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id QMkyb8WKRW-ScaqqB0v; Fri, 19 Dec 2014 18:28:39 +0300 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1419002919; bh=3C0AnzAe/k8Gz12yx3ZpM3sOL4XKumMYbMsNd4bf6Tw=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=RP6zEeVv7pZm39ah7BrqAjcol1pR/w8hq4MWQghtH05yQd635ON5BdsE6Y4ySh55U Ld8EN68lniTErSYQzHxTLN4VEvvQaneU8rjCEKZ1QK31BPkVTeT6RbG2r1l45iXPx4 qBy7dTzvvREk+l+njo6fv7Va0b6+/6kXZ8vZ6L7U= Authentication-Results: smtp17.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: <87ppbikb6g.fsf@secretsauce.net> 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:97571 Archived-At: On 12/17/2014 09:57 AM, Dima Kogan wrote: > Apparently the "0 0 0 0" represents a "scalable" font. Not 100% sure > what this means in the context of X11. In Emacs, we load this font with > XLoadQueryFont() in xfont_open(). I wrote a small program to see what > this means on my box: > > #include > #include > #include > #include > int main(void) > { > Display* dpy = XOpenDisplay(":0.0"); > > const char* font_input = "-adobe-courier-medium-i-normal-*-0-0-0-0-p-0-iso8859-1"; > const char* font_output; > unsigned long value; > > XFontStruct *font = XLoadQueryFont(dpy, font_input); > XGetFontProperty (font, XA_FONT, &value); > font_output = XGetAtomName (dpy, (Atom) value); > > fprintf(stderr, "font '%s' loaded as '%s'\n", font_input, font_output); > return 0; > } > > Here I load the scalable font that Emacs is choosing (and that xlsfonts > says exists on my machine). Then after it is loaded, I ask what the font > is called. The output is this: > > font '-adobe-courier-medium-i-normal-*-0-0-0-0-p-0-iso8859-1' loaded as > '-urw-nimbus mono l-regular-o-normal--17-120-100-100-p-100-iso8859-1' Hm. On my system (Fedora 21), there are no -adobe-courier-medium-i-normal-* fonts but: $ xlsfonts | grep -- -adobe-utopia-bold-i-normal- -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso10646-1 -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso10646-1 -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1 -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1 -adobe-utopia-bold-i-normal--10-100-75-75-p-58-iso10646-1 -adobe-utopia-bold-i-normal--12-120-75-75-p-70-iso10646-1 -adobe-utopia-bold-i-normal--14-100-100-100-p-78-iso10646-1 -adobe-utopia-bold-i-normal--14-100-100-100-p-78-iso8859-1 -adobe-utopia-bold-i-normal--15-140-75-75-p-82-iso10646-1 -adobe-utopia-bold-i-normal--17-120-100-100-p-93-iso10646-1 -adobe-utopia-bold-i-normal--17-120-100-100-p-93-iso8859-1 -adobe-utopia-bold-i-normal--19-140-100-100-p-109-iso10646-1 -adobe-utopia-bold-i-normal--19-140-100-100-p-109-iso8859-1 -adobe-utopia-bold-i-normal--19-180-75-75-p-105-iso10646-1 -adobe-utopia-bold-i-normal--25-180-100-100-p-139-iso10646-1 -adobe-utopia-bold-i-normal--25-180-100-100-p-139-iso8859-1 -adobe-utopia-bold-i-normal--25-240-75-75-p-140-iso10646-1 -adobe-utopia-bold-i-normal--33-240-100-100-p-186-iso10646-1 -adobe-utopia-bold-i-normal--33-240-100-100-p-186-iso8859-1 And running your program with -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1 produces: font '-adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1' loaded as '-adobe-utopia-bold-i-normal--17-120-100-100-p-94-iso8859-1' Your X behaves pretty strange; I can't explain this just now. Also, what happens if you specify default font via ~/.Xdefaults and run with emacs -q (small 'q', not 'Q')? Dmitry