From: Kenichi Handa Date: Fri, 16 Jun 2006 12:11:10 +0000 (+0000) Subject: (x_new_fontset2): Change arguments. Both args FONTSET X-Git-Tag: emacs-pretest-23.0.90~8295^2~892 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8140317c7b62df97e16ae78d05d8abe7521952ef;p=emacs.git (x_new_fontset2): Change arguments. Both args FONTSET and FONT_OBJECT must be existing ones. --- diff --git a/src/xterm.c b/src/xterm.c index d5253e27906..4f2bc73c9f9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8172,46 +8172,22 @@ x_new_fontset (f, fontsetname) #ifdef USE_FONT_BACKEND Lisp_Object -x_new_fontset2 (f, fontsetname) +x_new_fontset2 (f, fontset, font_object) struct frame *f; - Lisp_Object fontsetname; + int fontset; + Lisp_Object font_object; { - int fontset; - struct font *font; - XFontStruct *xfont; - - if (STRINGP (fontsetname)) - { - fontset = fs_query_fontset (fontsetname, 0); - if (fontset > 0 && f->output_data.x->fontset == fontset) - /* This fontset is already set in frame F. There's nothing more - to do. */ - return fontset_name (fontset); - if (fontset == 0) - /* The default fontset can't be the default font. */ - return Qt; - if (fontset < 0) - fontset = new_fontset_from_font_name (fontsetname); - } - else - fontset = new_fontset_from_font (f, fontsetname); - - if (fontset < 0) - return Qnil; - - font = fontset_ascii_font (f, fontset); - if (! font) - return Qnil; - xfont = font->font.font; + struct font *font = XSAVE_VALUE (font_object)->pointer; - if (FRAME_FONT (f) == xfont) + if (FRAME_FONT_OBJECT (f) == font) /* This font is already set in frame F. There's nothing more to do. */ return fontset_name (fontset); BLOCK_INPUT; - FRAME_FONT (f) = xfont; + FRAME_FONT_OBJECT (f) = font; + FRAME_FONT (f) = font->font.font; FRAME_BASELINE_OFFSET (f) = font->font.baseline_offset; FRAME_FONTSET (f) = fontset;