diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-07-24 07:23:16 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-07-24 07:23:16 +0000 |
commit | e8f362d501c851d870db9080c4288dbd9ebba50a (patch) | |
tree | 49d5a483b02043b32e59f351943086c74fddacb1 /src/xfns.c | |
parent | a799b8d09b44cf255ef3d350dcc1ca19b1ede91a (diff) | |
download | emacs-e8f362d501c851d870db9080c4288dbd9ebba50a.tar.gz |
(Fx_create_frame): Don't look for default font
if the caller has specified a valid font. Try several
alternative font patterns.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index 43dbabbc80e..ade94e129be 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1753,13 +1753,27 @@ be shared by the new frame.") { 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); } |