changeset 40224:12dcadf8cb59

(Finternal_set_lisp_face_attribute) [HAVE_WINDOW_SYSTEM]: Don't do anything for QCfont unless the frame is on a windowed display.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 23 Oct 2001 17:19:21 +0000
parents ec64097f5038
children c86d8211ff37
files src/xfaces.c
diffstat 1 files changed, 24 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Tue Oct 23 16:57:15 2001 +0000
+++ b/src/xfaces.c	Tue Oct 23 17:19:21 2001 +0000
@@ -4043,27 +4043,30 @@
   else if (EQ (attr, QCfont))
     {
 #ifdef HAVE_WINDOW_SYSTEM
-      /* Set font-related attributes of the Lisp face from an
-	 XLFD font name.  */
-      struct frame *f;
-      Lisp_Object tmp;
-
-      CHECK_STRING (value, 3);
-      if (EQ (frame, Qt))
-	f = SELECTED_FRAME ();
-      else
-	f = check_x_frame (frame);
-
-      /* VALUE may be a fontset name or an alias of fontset.  In such
-         a case, use the base fontset name.  */
-      tmp = Fquery_fontset (value, Qnil);
-      if (!NILP (tmp))
-	value = tmp;
-
-      if (!set_lface_from_font_name (f, lface, value, 1, 1))
-	signal_error ("Invalid font or fontset name", value);
-
-      font_attr_p = 1;
+      if (FRAME_WINDOW_P (f))
+	{
+	  /* Set font-related attributes of the Lisp face from an XLFD
+	     font name.  */
+	  struct frame *f;
+	  Lisp_Object tmp;
+
+	  CHECK_STRING (value, 3);
+	  if (EQ (frame, Qt))
+	    f = SELECTED_FRAME ();
+	  else
+	    f = check_x_frame (frame);
+
+	  /* VALUE may be a fontset name or an alias of fontset.  In
+	     such a case, use the base fontset name.  */
+	  tmp = Fquery_fontset (value, Qnil);
+	  if (!NILP (tmp))
+	    value = tmp;
+
+	  if (!set_lface_from_font_name (f, lface, value, 1, 1))
+	    signal_error ("Invalid font or fontset name", value);
+
+	  font_attr_p = 1;
+	}
 #endif /* HAVE_WINDOW_SYSTEM */
     }
   else if (EQ (attr, QCinherit))