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, 16 Dec 2014 22:57:41 -0800 Message-ID: <87ppbikb6g.fsf@secretsauce.net> References: <878uj674zh.fsf@secretsauce.net> <831tox7t03.fsf@gnu.org> <87a92zrj4b.fsf@secretsauce.net> <83egsbzbfu.fsf@gnu.org> <87r3vykdse.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418800046 10183 80.91.229.3 (17 Dec 2014 07:07:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2014 07:07:26 +0000 (UTC) Cc: 19117@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 08:07:20 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 1Y18hZ-0006Gj-5d for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 08:07:17 +0100 Original-Received: from localhost ([::1]:48165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y18hY-0006Qt-Jw for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 02:07:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y18hQ-0006Qj-4d for bug-gnu-emacs@gnu.org; Wed, 17 Dec 2014 02:07:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y18hK-0003Dv-AH for bug-gnu-emacs@gnu.org; Wed, 17 Dec 2014 02:07:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y18hK-0003Dq-7J for bug-gnu-emacs@gnu.org; Wed, 17 Dec 2014 02:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y18hJ-0007WA-Of for bug-gnu-emacs@gnu.org; Wed, 17 Dec 2014 02:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Dec 2014 07:07:01 +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.141879998128834 (code B ref 19117); Wed, 17 Dec 2014 07:07:01 +0000 Original-Received: (at 19117) by debbugs.gnu.org; 17 Dec 2014 07:06:21 +0000 Original-Received: from localhost ([127.0.0.1]:48389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y18ge-0007V0-Kg for submit@debbugs.gnu.org; Wed, 17 Dec 2014 02:06:20 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:54098) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y18gb-0007Ur-Pl for 19117@debbugs.gnu.org; Wed, 17 Dec 2014 02:06:18 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4DDDE20613 for <19117@debbugs.gnu.org>; Wed, 17 Dec 2014 02:06:17 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 17 Dec 2014 02:06:17 -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=E9E6LXylXYLF LL9u56/EUaKkN9Q=; b=JRemK7UY0dndl5/+wEwSJ2sjDAhLnxAe32SUF0qTmSbn aw8VuTwrCQg2swP+3SqoGBxfQI7+gr1b0bIyLleXC23uYxc/F7RTnNzx2oT7/201 DS3EGZ29PL+51y5ShTqlkJY/ThAJDL7Ynl+0xRPicEe4LU+/77la8jYgUS4kRBY= 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=E9E6LXylXYLFLL9u56/EUaKkN9Q=; b=HO1rzpoZMiGZlTXgKXlX zjFXoNADTCgn/cDzu5DRu9hOdnqiXZQFRg+z47g3QO2CzX3DcUO2wx2CxxEEh/uu nRrD+p45E3m62F0V7JyYuFFRSXdQg13+YgKP9C+qSj7b6DgDRn0oN13Bt3AY+Ht1 9Qf5SNHQwnDAOCSIBQleBGI= X-Sasl-enc: L1bBrzVSBti55hxprJkKqjk4R5IcSp4kxFYY3WVxqEte 1418799977 Original-Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 035CC6800F5; Wed, 17 Dec 2014 02:06:17 -0500 (EST) Original-Received: from dima by shorty.local with local (Exim 4.84) (envelope-from ) id 1Y18gZ-0002xd-Ki; Tue, 16 Dec 2014 23:06:15 -0800 In-reply-to: <87r3vykdse.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:97434 Archived-At: I just looked a bit more. As I mentioned in the last message, the font description that results in ugly rendering is # 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' So this completely explains why I'm getting ugly rendering. Emacs is picking a scalable adobe font, which XLoadQueryFont() interprets as a 17-pixel urw bitmap font. Since I was asking for an 11-pixel font to begin with, emacs is down-scaling this font by a factor of 11/17, which does not look so good.