GNU bug report logs -
#505
23.0.60; Font for fixed-pitch not resolved
Previous Next
Full log
Message #75 received at 505 <at> emacsbugs.donarmstrong.com (full text, mbox):
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.