aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-07-26 04:07:58 +0000
committerKenichi Handa2002-07-26 04:07:58 +0000
commit5f652afc469f7bc88482a6bdf50e83239a5b49af (patch)
tree5ea1e670a9b0f1b82450788243f8bd921f45948a /src
parentaf53b43ce34a6621f1e5b56dc2c80bdf4e9d41e9 (diff)
downloademacs-5f652afc469f7bc88482a6bdf50e83239a5b49af.tar.gz
emacs-5f652afc469f7bc88482a6bdf50e83239a5b49af.zip
(x_set_font): Always call x_new_fontset and
store_frame_parameter. (Fx_create_frame): Call x_new_fontset, not x_new_font. (syms_of_xfns): Set get_font_repertory_func to x_get_font_repertory.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 7f75550c184..2e5685b4acd 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1989,7 +1989,7 @@ x_set_font (f, arg, oldval)
1989 BLOCK_INPUT; 1989 BLOCK_INPUT;
1990 result = (STRINGP (fontset_name) 1990 result = (STRINGP (fontset_name)
1991 ? x_new_fontset (f, XSTRING (fontset_name)->data) 1991 ? x_new_fontset (f, XSTRING (fontset_name)->data)
1992 : x_new_font (f, XSTRING (arg)->data)); 1992 : x_new_fontset (f, XSTRING (arg)->data));
1993 UNBLOCK_INPUT; 1993 UNBLOCK_INPUT;
1994 1994
1995 if (EQ (result, Qnil)) 1995 if (EQ (result, Qnil))
@@ -2005,10 +2005,10 @@ x_set_font (f, arg, oldval)
2005 if (old_fontset == f->output_data.x->fontset) 2005 if (old_fontset == f->output_data.x->fontset)
2006 return; 2006 return;
2007 } 2007 }
2008 else if (!NILP (Fequal (result, oldval))) 2008 store_frame_param (f, Qfont, result);
2009 if (!NILP (Fequal (result, oldval)))
2009 return; 2010 return;
2010 2011
2011 store_frame_param (f, Qfont, result);
2012 recompute_basic_faces (f); 2012 recompute_basic_faces (f);
2013 } 2013 }
2014 else 2014 else
@@ -4429,28 +4429,22 @@ This function is an internal primitive--use `make-frame' instead. */)
4429 BLOCK_INPUT; 4429 BLOCK_INPUT;
4430 /* First, try whatever font the caller has specified. */ 4430 /* First, try whatever font the caller has specified. */
4431 if (STRINGP (font)) 4431 if (STRINGP (font))
4432 { 4432 font = x_new_fontset (f, XSTRING (font)->data);
4433 tem = Fquery_fontset (font, Qnil);
4434 if (STRINGP (tem))
4435 font = x_new_fontset (f, XSTRING (tem)->data);
4436 else
4437 font = x_new_font (f, XSTRING (font)->data);
4438 }
4439 4433
4440 /* Try out a font which we hope has bold and italic variations. */ 4434 /* Try out a font which we hope has bold and italic variations. */
4441 if (!STRINGP (font)) 4435 if (!STRINGP (font))
4442 font = x_new_font (f, "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"); 4436 font = x_new_fontset (f, "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1");
4443 if (!STRINGP (font)) 4437 if (!STRINGP (font))
4444 font = x_new_font (f, "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1"); 4438 font = x_new_fontset (f, "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1");
4445 if (! STRINGP (font)) 4439 if (! STRINGP (font))
4446 font = x_new_font (f, "-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1"); 4440 font = x_new_fontset (f, "-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1");
4447 if (! STRINGP (font)) 4441 if (! STRINGP (font))
4448 /* This was formerly the first thing tried, but it finds too many fonts 4442 /* This was formerly the first thing tried, but it finds too many fonts
4449 and takes too long. */ 4443 and takes too long. */
4450 font = x_new_font (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); 4444 font = x_new_fontset (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1");
4451 /* If those didn't work, look for something which will at least work. */ 4445 /* If those didn't work, look for something which will at least work. */
4452 if (! STRINGP (font)) 4446 if (! STRINGP (font))
4453 font = x_new_font (f, "-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1"); 4447 font = x_new_fontset (f, "-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1");
4454 UNBLOCK_INPUT; 4448 UNBLOCK_INPUT;
4455 if (! STRINGP (font)) 4449 if (! STRINGP (font))
4456 font = build_string ("fixed"); 4450 font = build_string ("fixed");
@@ -12098,6 +12092,7 @@ meaning don't clear the cache. */);
12098 find_ccl_program_func = x_find_ccl_program; 12092 find_ccl_program_func = x_find_ccl_program;
12099 query_font_func = x_query_font; 12093 query_font_func = x_query_font;
12100 set_frame_fontset_func = x_set_font; 12094 set_frame_fontset_func = x_set_font;
12095 get_font_repertory_func = x_get_font_repertory;
12101 check_window_system_func = check_x; 12096 check_window_system_func = check_x;
12102 12097
12103 /* Images. */ 12098 /* Images. */