From unknown Mon Jun 23 05:57:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2334 <2334@debbugs.gnu.org> To: bug#2334 <2334@debbugs.gnu.org> Subject: Status: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function Reply-To: bug#2334 <2334@debbugs.gnu.org> Date: Mon, 23 Jun 2025 12:57:13 +0000 retitle 2334 23.0.90; emacs-snapshot has ugly fonts when using set-default-= font elisp function reassign 2334 emacs submitter 2334 "Theodore Ts'o" severity 2334 normal thanks From tytso@thunk.org Sat Feb 14 21:32:38 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Feb 2009 05:32:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1F5WYYn009184 for ; Sat, 14 Feb 2009 21:32:36 -0800 Received: from mx10.gnu.org ([199.232.76.166]:39973) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LYZaK-00081q-1M for emacs-pretest-bug@gnu.org; Sun, 15 Feb 2009 00:30:32 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LYZcD-0002HS-T4 for emacs-pretest-bug@gnu.org; Sun, 15 Feb 2009 00:32:33 -0500 Received: from thunk.org ([69.25.196.29]:58370 helo=thunker.thunk.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LYZcD-0002HO-Il for emacs-pretest-bug@gnu.org; Sun, 15 Feb 2009 00:32:29 -0500 Received: from tytso authenticated as tytso by thunker.thunk.org with local (Exim 4.50 #1 (Debian)) id 1LYZcC-00046g-0S; Sun, 15 Feb 2009 00:32:28 -0500 To: emacs-pretest-bug@gnu.org Subject: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function From: "Theodore Ts'o" Phone: (781) 391-3464 Message-Id: Date: Sun, 15 Feb 2009 00:32:28 -0500 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Using emacs-snapshot-20090207, the text display becomes very ugly when set via: (set-default-font "DejaVu Sans Mono-10") However, if the font is set via the menu bar: Options->Set Default Font then the fonts look good (i.e., with proper anti-aliasing). In GNU Emacs 23.0.90.1 (i486-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-02-10 on iridium, modified by Debian (emacs-snapshot package, version 1:20090207-1~intrepid1) Windowing system distributor `The X.Org Foundation', version 11.0.10502000 configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.90/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.90/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: display-time-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x s e t - f SPC a SPC s SPC C-g M-x r e p o SPC SPC r SPC SPC SPC C-g C-x C-f C-g M-x r e p o r SPC SPC SPC Recent messages: Skipping dictionaries-common setup for emacs-snapshot Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /home/tytso/.emacs.custom...done For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Quit [2 times] call-interactively: End of buffer Making completion list... [2 times] Quit Quit From cyd@stupidchicken.com Mon Feb 16 07:25:28 2009 Received: (at 2334) by emacsbugs.donarmstrong.com; 16 Feb 2009 15:25:28 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1GFPPvS000590 for <2334@emacsbugs.donarmstrong.com>; Mon, 16 Feb 2009 07:25:26 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id C260357E1FC; Mon, 16 Feb 2009 10:26:16 -0500 (EST) From: Chong Yidong To: Kenichi Handa Cc: "Theodore Ts'o" , 2334@debbugs.gnu.org Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function Date: Mon, 16 Feb 2009 10:26:16 -0500 Message-ID: <8763jaqu7b.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Theodore Ts'o" wrote: > Using emacs-snapshot-20090207, the text display becomes very ugly when > set via: > (set-default-font "DejaVu Sans Mono-10") > However, if the font is set via the menu bar: Options->Set Default Font > then the fonts look good (i.e., with proper anti-aliasing). Hi Handa-san, I think we should give the xft font backend (where it is available) a higher priority than the x backend; otherwise, users will keep experiencing bugs like this. WDYT? From tytso@thunk.org Mon Feb 16 08:58:40 2009 Received: (at 2334) by emacsbugs.donarmstrong.com; 16 Feb 2009 16:58:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from thunker.thunk.org (thunk.org [69.25.196.29]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1GGwbZ4023051 for <2334@emacsbugs.donarmstrong.com>; Mon, 16 Feb 2009 08:58:38 -0800 Received: from tytso authenticated as tytso by thunker.thunk.org with local (Exim 4.50 #1 (Debian)) id 1LZ6nh-0004n4-B4; Mon, 16 Feb 2009 11:58:33 -0500 Date: Mon, 16 Feb 2009 11:00:05 -0500 From: Theodore Tso To: Chong Yidong Cc: Kenichi Handa , 2334@debbugs.gnu.org Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function Message-ID: <20090216160005.GA11788@mini-me.lan> References: <8763jaqu7b.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8763jaqu7b.fsf@cyd.mit.edu> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false On Mon, Feb 16, 2009 at 10:26:16AM -0500, Chong Yidong wrote: > "Theodore Ts'o" wrote: > > > Using emacs-snapshot-20090207, the text display becomes very ugly when > > set via: > > (set-default-font "DejaVu Sans Mono-10") > > However, if the font is set via the menu bar: Options->Set Default Font > > then the fonts look good (i.e., with proper anti-aliasing). > > Hi Handa-san, > > I think we should give the xft font backend (where it is available) a > higher priority than the x backend; otherwise, users will keep > experiencing bugs like this. > > WDYT? Stupid question --- is there a way to force the right thing to happen from emacs-lisp? My biggest gripe is that I couldn't figure out a way to make the right thing happem from my .emacs.el file, despite a lot of time spent trying to find the right interfaces via M-x apropos. So at the moment, I'm firing up emacs, and then having to use Options->Set Default Font from the menu bar to change to a small font size. (And I'm an old-school emacs person who normally would run with the menu bar and tool bar disabled. :-) I suspect the correct default though should be to give the xft font backend a higher priority; especially at the moment, where many people are using emacs-snapshot *because* of the nicer font display. Thanks, regards, - Ted From cyd@stupidchicken.com Mon Feb 16 10:22:05 2009 Received: (at 2334) by emacsbugs.donarmstrong.com; 16 Feb 2009 18:22:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1GIM2pR012299 for <2334@emacsbugs.donarmstrong.com>; Mon, 16 Feb 2009 10:22:03 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 52F8E57E1FC; Mon, 16 Feb 2009 13:22:54 -0500 (EST) From: Chong Yidong To: Theodore Tso Cc: Kenichi Handa , 2334@debbugs.gnu.org Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function References: <8763jaqu7b.fsf@cyd.mit.edu> <20090216160005.GA11788@mini-me.lan> Date: Mon, 16 Feb 2009 13:22:54 -0500 In-Reply-To: <20090216160005.GA11788@mini-me.lan> (Theodore Tso's message of "Mon, 16 Feb 2009 11:00:05 -0500") Message-ID: <87tz6ujl6p.fsf@cyd.mit.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Theodore Tso writes: > Stupid question --- is there a way to force the right thing to happen > from emacs-lisp? My biggest gripe is that I couldn't figure out a way > to make the right thing happem from my .emacs.el file Something like this will do the trick: (set-frame-parameter nil 'font-backend '(xft x)) From handa@m17n.org Tue Feb 17 22:00:28 2009 Received: (at 2334) by emacsbugs.donarmstrong.com; 18 Feb 2009 06:00:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1I60OSb024932 for <2334@emacsbugs.donarmstrong.com>; Tue, 17 Feb 2009 22:00:26 -0800 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n1I60NJU026523; Wed, 18 Feb 2009 15:00:23 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n1I60NaJ025995; Wed, 18 Feb 2009 15:00:23 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id n1I60MDk002163; Wed, 18 Feb 2009 15:00:22 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LZfU7-0000PL-0A; Wed, 18 Feb 2009 15:00:39 +0900 From: Kenichi Handa To: Chong Yidong CC: tytso@mit.edu, 2334@debbugs.gnu.org In-reply-to: <8763jaqu7b.fsf@cyd.mit.edu> (message from Chong Yidong on Mon, 16 Feb 2009 10:26:16 -0500) Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function References: <8763jaqu7b.fsf@cyd.mit.edu> Message-Id: Date: Wed, 18 Feb 2009 15:00:39 +0900 In article <8763jaqu7b.fsf@cyd.mit.edu>, Chong Yidong writes: > "Theodore Ts'o" wrote: > > Using emacs-snapshot-20090207, the text display becomes very ugly when > > set via: > > (set-default-font "DejaVu Sans Mono-10") > > However, if the font is set via the menu bar: Options->Set Default Font > > then the fonts look good (i.e., with proper anti-aliasing). > Hi Handa-san, > I think we should give the xft font backend (where it is available) a > higher priority than the x backend; otherwise, users will keep > experiencing bugs like this. I at first want to figure out why the above two methods for seting a font are different. At least, I can't reproduce the difference. Can you? When I have "dejavu sans mono" fonts both for fontconfig and X as below, both methods set the default font to X font. % fc-list 'dejavu sans mono' DejaVu Sans Mono:style=Bold Oblique DejaVu Sans Mono:style=Oblique DejaVu Sans Mono:style=Book DejaVu Sans Mono:style=Bold % xlsfonts '*-dejavu sans mono-*' -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso10646-1 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-m-0-iso10646-1 -dejavu-dejavu sans mono-bold-r-normal--0-0-0-0-c-0-iso10646-1 -dejavu-dejavu sans mono-bold-r-normal--0-0-0-0-m-0-iso10646-1 -dejavu-dejavu sans mono-medium-o-normal--0-0-0-0-c-0-iso10646-1 -dejavu-dejavu sans mono-medium-o-normal--0-0-0-0-m-0-iso10646-1 -dejavu-dejavu sans mono-medium-r-normal--0-0-0-0-c-0-iso10646-1 -dejavu-dejavu sans mono-medium-r-normal--0-0-0-0-m-0-iso10646-1 [...] --- Kenichi Handa handa@m17n.org From cyd@stupidchicken.com Wed Feb 18 05:47:55 2009 Received: (at 2334) by emacsbugs.donarmstrong.com; 18 Feb 2009 13:47:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1IDlq65005561 for <2334@emacsbugs.donarmstrong.com>; Wed, 18 Feb 2009 05:47:53 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id E546657E1D7; Wed, 18 Feb 2009 08:48:45 -0500 (EST) From: Chong Yidong To: Kenichi Handa Cc: tytso@mit.edu, 2334@debbugs.gnu.org Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function References: <8763jaqu7b.fsf@cyd.mit.edu> Date: Wed, 18 Feb 2009 08:48:45 -0500 In-Reply-To: (Kenichi Handa's message of "Wed, 18 Feb 2009 15:00:39 +0900") Message-ID: <87ljs3ua82.fsf@cyd.mit.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Kenichi Handa writes: > I at first want to figure out why the above two methods for > seting a font are different. At least, I can't reproduce > the difference. Can you? When I have "dejavu sans mono" > fonts both for fontconfig and X as below, both methods set > the default font to X font. I do see this bug. I have 'Emacs.Font: Monospace 9' in my .Xresources file. With `emacs -Q', C-u C-x = reports the font as xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x1E) If I then do M-: (modify-frame-parameters (selected-frame) (list (cons 'font "DejaVu Sans Mono 9"))) the font becomes non-antialised, and C-u C-x = reports x:-dejavu-dejavu sans mono-medium-r-normal--12-87-100-100-m-70-iso8859-1 (#x3B) My results for fc-list and xlsfonts are the same as yours. From cyd@stupidchicken.com Wed Feb 18 19:17:19 2009 Received: (at 2334-done) by emacsbugs.donarmstrong.com; 19 Feb 2009 03:17:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1J3HH9k032723 for <2334-done@emacsbugs.donarmstrong.com>; Wed, 18 Feb 2009 19:17:18 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 2C93957E1D7; Wed, 18 Feb 2009 22:18:11 -0500 (EST) From: Chong Yidong To: Kenichi Handa Cc: tytso@mit.edu, 2334-done@debbugs.gnu.org Subject: Re: 23.0.90; emacs-snapshot has ugly fonts when using set-default-font elisp function References: <8763jaqu7b.fsf@cyd.mit.edu> Date: Wed, 18 Feb 2009 22:18:11 -0500 In-Reply-To: (Kenichi Handa's message of "Wed, 18 Feb 2009 15:00:39 +0900") Message-ID: <878wo3qfm4.fsf@cyd.mit.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Kenichi Handa writes: > I at first want to figure out why the above two methods for > seting a font are different. At least, I can't reproduce > the difference. Can you? When I have "dejavu sans mono" > fonts both for fontconfig and X as below, both methods set > the default font to X font. If the frame is already using an XFT font, doing (set-face-attribute 'default (selected-frame) :font "DejaVu Sans Mono 10") will give an XFT (anti-aliased) version of DejaVu Sans Mono. If the frame is using an X font, the same code gives the X version of DejaVu Sans Mono. Doing (modify-frame-parameters (selected-frame) (list (cons 'font "DejaVu Sans Mono 10"))) always returns the X version. This discrepancy is due to the use of font_open_by_name instead of font_load_for_lface. I don't think there is anything that need to be corrected, apart from giving the XFT driver a higher priority; I've just done that. From unknown Mon Jun 23 05:57:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Thu, 19 Mar 2009 14:24:06 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator