GNU bug report logs - #505
23.0.60; Font for fixed-pitch not resolved

Previous Next

Package: emacs;

Reported by: Michael Welsh Duggan <md5i <at> cs.cmu.edu>

Date: Sun, 29 Jun 2008 19:35:03 UTC

Severity: normal

Tags: wontfix

Merged with 1219

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #75 received at 505 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Michael Welsh Duggan <md5i <at> md5i.com>
Cc: 505 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Font for fixed-pitch not resolved
Date: Wed, 15 Oct 2008 21:04:16 -0400
Interesting.  Okay, let's try something else (thanks for bearing with
me).

Could you save the following program in a file called, say, foo.c, then
compile it, run it, and show me the output (if any)?

cyd: ~ $ gcc foo.c -lX11 -o foo
cyd: ~ $ ./foo

Here's the program:

#include <X11/Xlib.h>
#include <X11/X.h>
#include <X11/Xatom.h>
#include <stdio.h>
#include <string.h>


int main ()
{
  int i, limit, num_fonts;
  char **names;
  Display *display = XOpenDisplay (NULL);
  char *pattern = "-unknown-Monospace-*-*-*-*-*-*-*-*-*-*-iso8859-1";

  for (limit = 512; ; limit *= 2)
    {
      names = XListFonts (display, pattern, limit, &num_fonts);
      if (num_fonts < limit)
	break;
      XFreeFontNames (names);
    }

  for (i = 0; i < num_fonts; i++)
    {
      XFontStruct *font;
      unsigned long value;

      printf ("%s\n", names[i]);
      font = XLoadQueryFont (display, names[i]);
      if (! font)
	continue;
      if (XGetFontProperty (font, XA_FONT, &value))
	{
	  char *name = (char *) XGetAtomName (display, (Atom) value);
	  int len = strlen (name);
	  if (len > 0)
	    printf("  %s\n", name);
	}
    }

  return 0;
}




This bug report was last modified 13 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.