Hi;

On Tue, 2008-02-05 at 18:56 +0000, iain wrote:
> On Tue, 2008-02-05 at 15:01 +0100, Gwenole Beauchesne wrote:
> 
> > So, for the first ' ' character (space), FT_Render_Glyph() in 
> > clutter/pango/pangoclutter-render.c::font_render_glyph() will return 
> > successfully (retval == 0), but face->glyph->bitmap.buffer == NULL, and 
> > face->glyph->{width,height} = 0.
> 
> I had a look at this: adding a check for face->glyph->bitmap.buffer ==
> NULL and just returning stops it crashing, but puts a ',' in place of 
> ' ' which seems a bit strange at the moment.
> 

Does attached patch further improve at all (totally untested btw, only
Intel here) ?

  == Matthew
Index: pangoclutter-render.c
===================================================================
--- pangoclutter-render.c	(revision 2035)
+++ pangoclutter-render.c	(working copy)
@@ -351,6 +351,13 @@
       Glyph bm;
       font_render_glyph (&bm, font, glyph);
 
+      if (bm.width < 1 || bm.height < 1 || bm.bitmap == NULL)
+        {
+          x += g->left;
+          y -= g->top;
+          return;
+        }
+
       if (g)
         g->generation = tc_generation;
       else

Reply via email to