comparison src/xterm.c @ 23162:b36799069143

(x_load_font): If SIZE is 0, don't use a name x_list_font returns.
author Kenichi Handa <handa@m17n.org>
date Tue, 01 Sep 1998 02:25:57 +0000
parents dad3317e5d8c
children 1e52542fb338
comparison
equal deleted inserted replaced
23161:55a8313019f3 23162:b36799069143
6698 /* If we have found fonts by x_list_font, load one of them. If 6698 /* If we have found fonts by x_list_font, load one of them. If
6699 not, we still try to load a font by the name given as FONTNAME 6699 not, we still try to load a font by the name given as FONTNAME
6700 because XListFonts (called in x_list_font) of some X server has 6700 because XListFonts (called in x_list_font) of some X server has
6701 a bug of not finding a font even if the font surely exists and 6701 a bug of not finding a font even if the font surely exists and
6702 is loadable by XLoadQueryFont. */ 6702 is loadable by XLoadQueryFont. */
6703 if (!NILP (font_names)) 6703 if (size > 0 && !NILP (font_names))
6704 fontname = (char *) XSTRING (XCONS (font_names)->car)->data; 6704 fontname = (char *) XSTRING (XCONS (font_names)->car)->data;
6705 6705
6706 BLOCK_INPUT; 6706 BLOCK_INPUT;
6707 font = (XFontStruct *) XLoadQueryFont (FRAME_X_DISPLAY (f), fontname); 6707 font = (XFontStruct *) XLoadQueryFont (FRAME_X_DISPLAY (f), fontname);
6708 UNBLOCK_INPUT; 6708 UNBLOCK_INPUT;