emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-related hanging / general brokenness


From: Kenichi Handa
Subject: Re: font-related hanging / general brokenness
Date: Thu, 19 Jun 2008 16:44:19 +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)

In article <address@hidden>, Miles Bader <address@hidden> 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
address@hidden

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 ();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]