# HG changeset patch # User Gerd Moellmann # Date 978613414 0 # Node ID 604d4b3d1054f5eefffc2b00756219da9ba1f5b8 # Parent 14c95b31ec716bcb961064bb7d1297d179ae514b (set_font_frame_param): Don't do anything for non-graphical frames. diff -r 14c95b31ec71 -r 604d4b3d1054 src/xfaces.c --- a/src/xfaces.c Thu Jan 04 12:53:51 2001 +0000 +++ b/src/xfaces.c Thu Jan 04 13:03:34 2001 +0000 @@ -4197,24 +4197,28 @@ Lisp_Object frame, lface; { struct frame *f = XFRAME (frame); - Lisp_Object font_name; - char *font; - - if (STRINGP (LFACE_FONT (lface))) - font_name = LFACE_FONT (lface); - else - { - /* Choose a font name that reflects LFACE's attributes and has - the registry and encoding pattern specified in the default - fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ - font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); - if (!font) - error ("No font matches the specified attribute"); - font_name = build_string (font); - xfree (font); - } + + if (FRAME_WINDOW_P (f)) + { + Lisp_Object font_name; + char *font; + + if (STRINGP (LFACE_FONT (lface))) + font_name = LFACE_FONT (lface); + else + { + /* Choose a font name that reflects LFACE's attributes and has + the registry and encoding pattern specified in the default + fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ + font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); + if (!font) + error ("No font matches the specified attribute"); + font_name = build_string (font); + xfree (font); + } - Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); + Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); + } }