# HG changeset patch # User Jim Blandy # Date 738255847 0 # Node ID ce9ea90b58481059a004649980e6150222f54a09 # Parent fac66d9828d7ef8807f9092a60f91d31f91f089b * xterm.c (x_new_font): Reject fonts with varying spacing. We don't support them yet. * xfns.c (x_set_font): Report the error message properly. diff -r fac66d9828d7 -r ce9ea90b5848 src/xterm.c --- a/src/xterm.c Mon May 24 15:03:32 1993 +0000 +++ b/src/xterm.c Mon May 24 15:04:07 1993 +0000 @@ -3877,6 +3877,7 @@ font_names = (char **) XListFontsWithInfo (x_current_display, fontname, 1024, &n_matching_fonts, &font_info); + /* If the server couldn't find any fonts whose named matched fontname, return an error code. */ if (n_matching_fonts == 0) @@ -3904,8 +3905,19 @@ /* Otherwise, load the font and add it to the table. */ else { + int i; XFontStruct *font; + /* Try to find a character-cell font in the list. */ + for (i = 0; i < n_matching_fonts; i++) + if (! font_info[i].per_char) + break; + + if (i >= n_matching_fonts) + return 2; + else + fontname = font_names[i]; + font = (XFontStruct *) XLoadQueryFont (x_current_display, fontname); if (! font) return 1;