[Patch][gui] jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c

Michael Koch konqueror@gmx.de
Sat Oct 9 08:16:00 GMT 2004


Hi list,


I just merged the attached patch from GNU classpath to merge
jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c again.


Michael


2004-10-09  Mark Wielaard  <mark@klomp.org>

	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c
	(setChars): Only call pango_itemize() when vec->glyphitems != NULL.
	Only call pango_shape() when gi->glyphs->num_glyphs > 0.

-------------- next part --------------
Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c,v
retrieving revision 1.2.12.3
diff -u -r1.2.12.3 gnu_java_awt_peer_gtk_GdkGlyphVector.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c	3 Sep 2004 23:27:41 -0000	1.2.12.3
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c	9 Oct 2004 08:15:22 -0000
@@ -273,7 +273,8 @@
   
   pango_context_set_font_description (vec->ctx, vec->desc);
 
-  items = pango_itemize (vec->ctx, str, 0, len, attrs, NULL);
+  if (vec->glyphitems != NULL)
+    items = pango_itemize (vec->ctx, str, 0, len, attrs, NULL);
   if (items != NULL)
     {
       
@@ -303,12 +304,15 @@
 	  gi->glyphs = pango_glyph_string_new ();
 	  g_assert (gi->glyphs != NULL);
 	  
-	  pango_shape (str + gi->item->offset, 
-		       gi->item->length, 
-		       &(gi->item->analysis), 
-		       gi->glyphs);
-	  
-	  vec->glyphitems = g_list_append (vec->glyphitems, gi);
+	  if (gi->glyphs->num_glyphs > 0)
+	    {
+	      pango_shape (str + gi->item->offset, 
+			   gi->item->length, 
+			   &(gi->item->analysis), 
+			   gi->glyphs);
+	      
+	      vec->glyphitems = g_list_append (vec->glyphitems, gi);
+	    }
 	}
       
       /* 


More information about the Java-patches mailing list