From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#3659: FW: 23.0.95; crash on set-frame-font Date: Mon, 29 Jun 2009 11:24:03 +0900 Message-ID: References: <63C2A154B1708946B60726AFDBA00AC005E5EC5A@ukmailemea01.misys.global.ad> <87iqinxbs7.fsf@stupidchicken.com> <63C2A154B1708946B60726AFDBA00AC005EABBA6@ukmailemea01.misys.global.ad> <87fxdp4ssu.fsf@stupidchicken.com> <87eit9ugs9.fsf@stupidchicken.com> Reply-To: Kenichi Handa , 3659@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1246243068 27203 80.91.229.12 (29 Jun 2009 02:37:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2009 02:37:48 +0000 (UTC) Cc: Simon.Marshall@misys.com, 3659@emacsbugs.donarmstrong.com, cyd@stupidchicken.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 04:37:40 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ML6kV-0000Rk-F8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 04:37:39 +0200 Original-Received: from localhost ([127.0.0.1]:36990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ML6kU-0008AE-Fc for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jun 2009 22:37:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ML6kQ-00089z-2A for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 22:37:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ML6kK-00089I-AM for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 22:37:32 -0400 Original-Received: from [199.232.76.173] (port=38613 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ML6kK-00089F-5S for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 22:37:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47761) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ML6kJ-00017k-MN for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 22:37:28 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5T2bOpR007631; Sun, 28 Jun 2009 19:37:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5T2U3Y6006220; Sun, 28 Jun 2009 19:30:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 29 Jun 2009 02:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3659 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3659-submit@emacsbugs.donarmstrong.com id=B3659.12462422525371 (code B ref 3659); Mon, 29 Jun 2009 02:30:03 +0000 Original-Received: (at 3659) by emacsbugs.donarmstrong.com; 29 Jun 2009 02:24:12 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5T2O6th005366 for <3659@emacsbugs.donarmstrong.com>; Sun, 28 Jun 2009 19:24:08 -0700 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n5T2O4fr010511; Mon, 29 Jun 2009 11:24:04 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n5T2O49S002927; Mon, 29 Jun 2009 11:24:04 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n5T2O3A1004615; Mon, 29 Jun 2009 11:24:03 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1ML6XL-00071p-0g; Mon, 29 Jun 2009 11:24:03 +0900 In-reply-to: (message from Glenn Morris on Fri, 26 Jun 2009 22:45:18 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 28 Jun 2009 22:37:32 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29067 Archived-At: In article , Glenn Morris writes: > Kenichi Handa wrote: > > In a debugger, please check the values of filename (LispString), > > index (LispInt), and xftfont (XftFont *) just before calling > > XftLockFace at xftfont.c:290. > A breakpoint in this area is triggered 4 times before the Emacs frame > appears, then once more after the frame appears. It crashes on the 5th > time. > The 5 values of filename are: > /usr/openwin/lib/X11/fonts/75dpi/courR14.pcf.Z > /usr/openwin/lib/X11/fonts/75dpi/courR14.pcf.Z > /usr/openwin/lib/X11/fonts/75dpi/courO14.pcf.Z > /usr/openwin/lib/X11/fonts/75dpi/courR14.pcf.Z > /usr/openwin/lib/X11/fonts/100dpi/courB10.pcf.Z > "index" is always 0. > "xftfont" is always 0 (perhaps I am printing it wrong? I use "pp".) You should use the normal p(rint) command for xftfont because it is not a Lisp object. But, if "pp xftfont" shows 0, xftfont is actually NULL. > > By the way, are there any fonts with that you can startup > > Emacs with --xrm 'Emacs*FontBackend: xft'? > I didn't check them all, but these work: > -*-FreeMono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1 > -monotype-Times New-Roman-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1 > These are both TrueType fonts. I did not find any of the fonts in the > 75dpi directory that worked (but it was not an exhaustive search). Hmmm, it seems that there's something wrong in you Xft (or underlying fontconfig/freetype) Please compile the attached program and run it (as below). What is shown? % gcc `pkg-config --cflags xft` `pkg-config --libs xft` -o xfttest xfttest.c % ./xfttest /usr/openwin/lib/X11/fonts/75dpi/courR14.pcf.Z --- Kenichi Handa handa@m17n.org --- xfttest.c --- #include #include #include #include #include int main (int argc, char **argv) { Display *display; FcPattern *pat, *match; FcObjectSet *objset; FcFontSet *fontset; FcResult result; XftFont *font; display = XOpenDisplay (NULL); if (! display) { fprintf (stderr, "Can't open a display\n"); exit (1); } if (argc < 2) { fprintf (stderr, "Usage: xfttest FONT-FILE-NAME\n"); exit (1); } printf ("Listing a font by file name and index ... "); pat = FcPatternBuild (0, FC_FILE, FcTypeString, (FcChar8 *) argv[1], FC_INDEX, FcTypeInteger, 0, NULL); objset = FcObjectSetBuild (FC_FOUNDRY, FC_FAMILY, FC_WEIGHT, FC_SLANT, FC_WIDTH, FC_PIXEL_SIZE, FC_SPACING, FC_SCALABLE, FC_STYLE, FC_FILE, FC_INDEX, NULL); fontset = FcFontList (NULL, pat, objset); if (fontset && fontset->nfont > 0) { int i; printf ("found these fonts:\n"); for (i = 0; i < fontset->nfont; i++) { FcChar8 *file; printf (" %02d:", i + 1); if (FcPatternGetString (fontset->fonts[i], FC_FILE, 0, &file) == FcResultMatch) printf ("%s\n", (char *) file); else printf ("no filename\n"); } printf ("Matching the first one ... "); match = XftFontMatch (display, 0, fontset->fonts[0], &result); if (match) { FcChar8 *file; FcPatternGetString (match, FC_FILE, 0, &file); printf (" matched\n %s opening ... ", file); font = XftFontOpenPattern (display, match); if (font) { printf ("ok\n"); XftFontClose (display, font); } else { printf ("no\n"); } } else { printf (" not matched\n"); } } else { printf (" none\n"); } exit (0); }