# HG changeset patch # User Richard M. Stallman # Date 743498596 0 # Node ID 085095792d9959b53e7a4180d23ce052910ba329 # Parent 8f02e992e4dc33689f277e7795a38450c09b2b65 (Fx_create_frame): Don't look for default font if the caller has specified a valid font. Try several alternative font patterns. diff -r 8f02e992e4dc -r 085095792d99 src/xfns.c --- a/src/xfns.c Sat Jul 24 05:49:51 1993 +0000 +++ b/src/xfns.c Sat Jul 24 07:23:16 1993 +0000 @@ -1753,13 +1753,27 @@ { Lisp_Object font; - /* Try out a font which we know has bold and italic variations. */ + font = x_get_arg (parms, Qfont, "font", "Font", string); BLOCK_INPUT; - font = x_new_font (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); + /* First, try whatever font the caller has specified. */ + if (STRINGP (font)) + font = x_new_font (f, XSTRING (tem)->data); + /* Try out a font which we hope has bold and italic variations. */ + if (!STRINGP (font)) + font = x_new_font (f, "-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-1"); + if (! STRINGP (font)) + font = x_new_font (f, "-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-1"); + if (! STRINGP (font)) + /* This was formerly the first thing tried, but it finds too many fonts + and takes too long. */ + font = x_new_font (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); + /* If those didn't work, look for something which will at least work. */ + if (! STRINGP (font)) + font = x_new_font (f, "-*-fixed-*-*-*-*-*-120-*-*-c-*-iso8859-1"); UNBLOCK_INPUT; if (! STRINGP (font)) - font = build_string ("-*-fixed-*-*-*-*-*-120-*-*-c-*-iso8859-1"); - + font = build_string ("fixed"); + x_default_parameter (f, parms, Qfont, font, "font", "Font", string); }