From: Kenichi Handa Date: Tue, 22 Jan 2008 12:03:15 +0000 (+0000) Subject: (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: X-Git-Tag: emacs-pretest-23.0.90~8295^2~28 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db1c10a277d4bfc091ff043cb30224e3bc6f35d1;p=emacs.git (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: Fix previous change. If the frame is not on a window system, signal an error. --- diff --git a/src/xfaces.c b/src/xfaces.c index c2a5dd9d4a0..ce7e9bec498 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4540,41 +4540,32 @@ FRAME 0 means change the face on all frames, and change the default #ifdef USE_FONT_BACKEND if (enable_font_backend - && FRAME_WINDOW_P (XFRAME (frame)) && !UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)) { - int fontset; - + tmp = Fquery_fontset (value, Qnil); if (EQ (attr, QCfontset)) { - Lisp_Object fontset_name = Fquery_fontset (value, Qnil); - - if (NILP (fontset_name)) + if (NILP (tmp)) signal_error ("Invalid fontset name", value); - LFACE_FONTSET (lface) = value; + LFACE_FONTSET (lface) = tmp; } else { + int fontset; Lisp_Object font_object; - if (FONT_OBJECT_P (value)) + if (! NILP (tmp)) { - font_object = value; - fontset = FRAME_FONTSET (f); + fontset = fs_query_fontset (tmp, 0); + value = fontset_ascii (fontset); } else { - CHECK_STRING (value); - - fontset = fs_query_fontset (value, 0); - if (fontset >= 0) - value = fontset_ascii (fontset); - else - fontset = FRAME_FONTSET (f); - font_object = font_open_by_name (f, SDATA (value)); - if (NILP (font_object)) - signal_error ("Invalid font", value); + fontset = FRAME_FONTSET (f); } + font_object = font_open_by_name (f, SDATA (value)); + if (NILP (font_object)) + signal_error ("Invalid font", value); set_lface_from_font_and_fontset (f, lface, font_object, fontset, 1); }