[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: segmentation fault :-(



Le Sun, Jun 02, 2002, à 08:32:04PM +0200, Cyrille Chepelov a écrit:
> I'm committing the patch which is appended here (font.diff)

Here's the patch.

	-- Cyrille

-- 
Grumpf.

? autom4te.cache
? app/sheets_dialog_callbacks.c.no
? lib/font.E
? lib/stCFJvM7
? lib/styJrClm
? lib/text.c.heldoff.patch
? plug-ins/metapost/Makefile
? plug-ins/metapost/Makefile.in
? po/POTFILES.in.new
? po/fr.po.utf
? samples/ER-demo.png
? samples/SADT.png
? samples/UML-demo.png
? samples/chronograms.png
? samples/grafcet.png
? shapes/Misc/Makefile
? shapes/Misc/Makefile.in
Index: lib/font.c
===================================================================
RCS file: /cvs/gnome/dia/lib/font.c,v
retrieving revision 1.65
diff -u -r1.65 font.c
--- lib/font.c	30 May 2002 05:44:20 -0000	1.65
+++ lib/font.c	2 Jun 2002 18:27:12 -0000
@@ -467,6 +467,8 @@
 
 char *last_resort_fonts[] = {
   "-adobe-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+  "-urw-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+  "-*-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*",
 #ifndef G_OS_WIN32
   "system" /* Must be last. This is guaranteed to exist on a MS-Windows 
               system. */
@@ -531,6 +533,14 @@
     }
   }
 
+  if (gdk_font == NULL) {
+      message_warning(_("Unable to load any GDK font for %s font; even "
+                        "last resorts alternatives failed.\n"
+                        "This is fatal, sorry."),
+                      x11_font);
+      g_assert_not_reached();
+  }
+  
   height = (real)gdk_font->ascent + gdk_font->descent;
   font->ascent_ratio = gdk_font->ascent/height;
   font->descent_ratio = gdk_font->descent/height;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK