From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: font-related hanging / general brokenness Date: Thu, 19 Jun 2008 16:44:19 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1213861559 16860 80.91.229.12 (19 Jun 2008 07:45:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Jun 2008 07:45:59 +0000 (UTC) Cc: monnier@cs.yale.edu, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 19 09:46:43 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K9Equ-0007GF-9z for ged-emacs-devel@m.gmane.org; Thu, 19 Jun 2008 09:46:40 +0200 Original-Received: from localhost ([127.0.0.1]:35813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9Eq5-0002LQ-Vu for ged-emacs-devel@m.gmane.org; Thu, 19 Jun 2008 03:45:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K9Eow-00022a-Cc for emacs-devel@gnu.org; Thu, 19 Jun 2008 03:44:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K9Eou-00021g-HW for emacs-devel@gnu.org; Thu, 19 Jun 2008 03:44:37 -0400 Original-Received: from [199.232.76.173] (port=36820 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9Eou-00021b-Ao for emacs-devel@gnu.org; Thu, 19 Jun 2008 03:44:36 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:62502) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9Eoj-0001OM-Vy; Thu, 19 Jun 2008 03:44:27 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m5J7j9nL010124; Thu, 19 Jun 2008 16:45:09 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m5J7iJ8R025252; Thu, 19 Jun 2008 16:44:19 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id m5J7iJx2019128; Thu, 19 Jun 2008 16:44:19 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1K9Eod-0006Qx-E9; Thu, 19 Jun 2008 16:44:19 +0900 In-reply-to: (message from Miles Bader on Thu, 19 Jun 2008 15:58:38 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:99450 Archived-At: In article , Miles Bader writes: > Well... perhaps it is an X bug, but it's a standard debian installation > AFAIK. If I'm having problems, I expect many more people will as well. Perhaps no other application can use both X and Xft fonts at the same time. > If use the `-l' option to xlsfonts, btw, it _doesn't_ show the bogus entry: > $ xlsfonts -fn '-*-dejavu sans mono-medium-r-normal--16-*-0-0-c-0-iso8859-1' > -bitstream-dejavu sans mono-medium-r-normal--16-0-0-0-c-0-iso8859-1 > -dejavu-dejavu sans mono-medium-r-normal--16-0-0-0-c-0-iso8859-1 > $ xlsfonts -l -fn '-*-dejavu sans mono-medium-r-normal--16-*-0-0-c-0-iso8859-1' > DIR MIN MAX EXIST DFLT PROP ASC DESC NAME > --> 0 255 some 0 36 17 6 -dejavu-dejavu sans mono-medium-r-normal--16-0-0-0-c-0-iso8859-1 Do you mean that you can open the font: -dejavu-dejavu sans mono-medium-r-normal--16-0-0-0-c-0-iso8859-1 by xfd? If so, could you try the attached patch? According to the source code of xlsfonts, "-l" forces it to use XListFontsWithInfo instead of XListFonts. --- Kenichi Handa handa@ni.aist.go.jp Index: xfont.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/xfont.c,v retrieving revision 1.14 diff -u -r1.14 xfont.c --- xfont.c 5 Jun 2008 04:15:44 -0000 1.14 +++ xfont.c 19 Jun 2008 07:39:43 -0000 @@ -221,13 +221,14 @@ Lisp_Object list = Qnil; int i, limit, num_fonts; char **names; + XFontStruct *info; BLOCK_INPUT; x_catch_errors (display); for (limit = 512; ; limit *= 2) { - names = XListFonts (display, pattern, limit, &num_fonts); + names = XListFontsWithInfo (display, pattern, limit, &num_fonts, &info); if (x_had_errors_p (display)) { /* This error is perhaps due to insufficient memory on X @@ -238,7 +239,7 @@ } if (num_fonts < limit) break; - XFreeFontNames (names); + XFreeFontInfo (names, info, num_fonts); } if (num_fonts > 0) @@ -291,7 +292,7 @@ || XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) > 0)) list = Fcons (entity, list); } - XFreeFontNames (names); + XFreeFontInfo (names, info, num_fonts); } x_uncatch_errors ();