changeset 89947:62d04caf8fb9

(Fface_font): If HAVE_WINDOW_SYSTEM is not defined, don't refer to face->font.
author Kenichi Handa <handa@m17n.org>
date Wed, 30 Jun 2004 04:12:09 +0000
parents 8282359ed212
children e94e49dc760e
files src/xfaces.c
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Tue Jun 29 16:48:18 2004 +0000
+++ b/src/xfaces.c	Wed Jun 30 04:12:09 2004 +0000
@@ -4997,14 +4997,18 @@
 
       if (! face)
 	return Qnil;
-      if (NILP (character))
-	return build_string (face->font_name);
-      CHECK_CHARACTER (character);
-      face_id = FACE_FOR_CHAR (f, face, XINT (character), -1, Qnil);
-      face = FACE_FROM_ID (f, face_id);
-      return (face->font && face->font_name
-	      ? build_string (face->font_name)
-	      : Qnil);
+#ifdef HAVE_WINDOW_SYSTEM
+      if (!NILP (character))
+	{
+	  CHECK_CHARACTER (character);
+	  face_id = FACE_FOR_CHAR (f, face, XINT (character), -1, Qnil);
+	  face = FACE_FROM_ID (f, face_id);
+	  return (face->font && face->font_name
+		  ? build_string (face->font_name)
+		  : Qnil);
+	}
+#endif
+      return build_string (face->font_name);
     }
 }