diff src/objects-x.c @ 4757:a23ac8f90a49

Improve warning and error messages from Xft. Default debug-level messages off. Cast away Xft warnings from C compiler.
author Stephen J. Turnbull <stephen@xemacs.org>
date Wed, 18 Nov 2009 15:25:00 +0900
parents 98af8a976fc3
children a6c778975d7d 304aebb79cd3
line wrap: on
line diff
--- a/src/objects-x.c	Wed Nov 18 11:28:58 2009 +0900
+++ b/src/objects-x.c	Wed Nov 18 15:25:00 2009 +0900
@@ -758,6 +758,12 @@
     {
       /* The font is already open, we just unparse. */
       FcChar8 *res = FcNameUnparse (FONT_INSTANCE_X_XFTFONT (f)->pattern);
+      if (! FONT_INSTANCE_X_XFTFONT (f)->pattern)
+	{
+	  maybe_signal_error (Qgui_error,
+			      "Xft font present but lacks pattern",
+			      wrap_font_instance(f), Qfont, errb);
+	}
       if (res)
 	{
 	  FONT_INSTANCE_TRUENAME (f) = 
@@ -769,7 +775,7 @@
 	{
 	  maybe_signal_error (Qgui_error,
 			      "Couldn't unparse Xft font to truename",
-			      Qnil, Qfont, errb);
+			      wrap_font_instance(f), Qfont, errb);
 	  /* used to return Qnil here */
 	}
     }