Bug 33081

Summary: Gimp crashes (font related)
Product: [Retired] Red Hat Raw Hide Reporter: Itai Nahshon <nahshon>
Component: gtk+Assignee: David Mason <dcm>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: msw, otaylor, teg, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-30 19:58:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Here's the fix none

Description Itai Nahshon 2001-03-24 11:56:41 UTC
Gimp crashes when I select the font 'newspaper' in the
Text Tool font menu.

The font in problem is containd in the file
/usr/X11R6/lib/X11/fonts/misc/arabic24.pcf.gz
which is part of the package XFree86-4.0.3-1. 

It's likely that the the problem is actually not is the Gimp but in one of
the underlyng libraries (gtk/gdk/X11).

Comment 1 Trond Eivind Glomsrxd 2001-03-26 15:41:40 UTC
*** Bug 32106 has been marked as a duplicate of this bug. ***

Comment 2 Trond Eivind Glomsrxd 2001-03-28 20:29:15 UTC
This is a 2-byte font.. could gtk+ have problems with this? Owen?

Comment 3 Trond Eivind Glomsrxd 2001-03-28 20:57:48 UTC
It does work with other 2 byte fonts, though - and the stack of gimp is about 52
k entries deep when it crashes.

Comment 4 Owen Taylor 2001-03-28 21:06:48 UTC
Once I get information from Matt about his bug, will make
a package with the following:

Index: gtkfontsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfontsel.c,v
retrieving revision 1.23.2.8
diff -u -r1.23.2.8 gtkfontsel.c
--- gtkfontsel.c	2001/02/22 22:02:24	1.23.2.8
+++ gtkfontsel.c	2001/03/28 21:07:09
@@ -1647,7 +1647,7 @@
 				gpointer        data)
 {
   GtkFontSelection *fontsel;
-  gint new_size;
+  gdouble new_size;
   gchar *text;
   gchar buffer[16];
   gint i;
@@ -1673,11 +1673,11 @@
   gtk_entry_set_text(GTK_ENTRY(fontsel->size_entry), buffer);
   
   /* Check if the font size has changed, and return if it hasn't. */
-  new_size = atoi(text);
+  new_size = atof(text);
   if (fontsel->metric == GTK_FONT_METRIC_POINTS)
     new_size *= 10;
   
-  if (fontsel->size == new_size)
+  if (fontsel->size == (gint)new_size)
     return;
   
   /* If the size was selected by the user we set the selected_size. */


Comment 5 Itai Nahshon 2001-03-28 23:03:53 UTC
Gimp does not work correctly with other 2 byte fonts but it does not crash.
One thing special about the font "newspaper": It does not contain characters
in the 7-bit ASCII range. I think we expect that fonts that are calle
"iso-10646-1"
are expected to contain at least a minimal subset.

Comment 6 Tim Waugh 2001-03-30 17:41:12 UTC
This is a gtk+ bug.


Comment 7 Tim Waugh 2001-03-30 17:42:00 UTC
Created attachment 14263 [details]
Here's the fix

Comment 8 Owen Taylor 2001-03-30 17:45:07 UTC
Well, thanks for the patch, but look up a few lines....

Comment 9 Tim Waugh 2001-03-30 17:55:45 UTC
Oh yeah.

I must read mail from bugzilla
I must read mail from bugzilla
I must read mail from bugzilla



Comment 10 Trond Eivind Glomsrxd 2001-03-30 19:58:07 UTC
After applying the patch, gimp no longer crashes when using the font... but the
text in this font is _tiny_.

Comment 11 Matt Wilson 2001-04-06 20:12:51 UTC
gtk+-1.2.9-5