? examples/TEST-ARABIC
? examples/TEST-IPA-I-GUESS
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/pango/ChangeLog,v
retrieving revision 1.1264
diff -u -p -r1.1264 ChangeLog
--- ChangeLog	5 Dec 2005 20:22:23 -0000	1.1264
+++ ChangeLog	6 Dec 2005 01:20:27 -0000
@@ -1,5 +1,11 @@
 2005-12-05  Behdad Esfahbod  <behdad@gnome.org>
 
+	* pango/pangocairo-fcfont.c, pango/pangocairo-private.h,
+	pango/pangocairo-render.c: Draw an empty dashed box on missing glyphs
+	for cairo-fc backend.
+
+2005-12-05  Behdad Esfahbod  <behdad@gnome.org>
+
 	* pango/mini-fribidi/fribidi.c, pango/mini-fribidi/fribidi_config.h,
 	pango/mini-fribidi/fribidi.patch: Use new g_slice API for TypeLink
 	allocation, instead of GMemChunks.
Index: pango/pangocairo-fcfont.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-fcfont.c,v
retrieving revision 1.19
diff -u -p -r1.19 pangocairo-fcfont.c
--- pango/pangocairo-fcfont.c	29 Nov 2005 14:43:15 -0000	1.19
+++ pango/pangocairo-fcfont.c	6 Dec 2005 01:20:27 -0000
@@ -38,8 +38,6 @@
 #define PANGO_CAIRO_IS_FONT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CAIRO_FC_FONT))
 #define PANGO_CAIRO_FC_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CAIRO_FC_FONT, PangoCairoFcFontClass))
 
-#define PANGO_CAIRO_UNKNOWN_FLAG 0x10000000
-
 typedef struct _PangoCairoFcFont      PangoCairoFcFont;
 typedef struct _PangoCairoFcFontClass PangoCairoFcFontClass;
 
@@ -351,7 +349,7 @@ static PangoGlyph
 pango_cairo_fc_font_real_get_unknown_glyph (PangoFcFont *font,
 					    gunichar     wc)
 {
-  return 0;
+  return wc | PANGO_CAIRO_UNKNOWN_FLAG;
 }
 
 static void
@@ -364,8 +362,9 @@ pango_cairo_fc_font_glyph_extents_cache_
 
   cffont->font_extents.x = 0;
   cffont->font_extents.y = - font_extents.ascent * PANGO_SCALE;
-  cffont->font_extents.width = 0;
   cffont->font_extents.height = (font_extents.ascent + font_extents.descent) * PANGO_SCALE;
+  /* The width is only used for the width of box drawn for glyph-not-found */
+  cffont->font_extents.width = (font_extents.ascent - font_extents.descent) * PANGO_SCALE;
 
   cffont->glyph_extents_cache = g_new0 (GlyphExtentsCacheEntry, GLYPH_CACHE_NUM_ENTRIES);
   /* Make sure all cache entries are invalid initially */
@@ -447,7 +446,7 @@ pango_cairo_fc_font_get_glyph_extents (P
     pango_cairo_fc_font_glyph_extents_cache_init (cffont);
 
 
-  if (glyph == 0)
+  if (glyph & PANGO_CAIRO_UNKNOWN_FLAG)
     {
       if (ink_rect)
 	*ink_rect = cffont->font_extents;
Index: pango/pangocairo-private.h
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-private.h,v
retrieving revision 1.5
diff -u -p -r1.5 pangocairo-private.h
--- pango/pangocairo-private.h	4 Nov 2005 23:55:37 -0000	1.5
+++ pango/pangocairo-private.h	6 Dec 2005 01:20:27 -0000
@@ -27,6 +27,8 @@
 
 G_BEGIN_DECLS
 
+#define PANGO_CAIRO_UNKNOWN_FLAG 0x10000000
+
 #define PANGO_CAIRO_FONT_MAP_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PANGO_TYPE_CAIRO_FONT_MAP, PangoCairoFontMapIface))
 
 typedef struct _PangoCairoFontMapIface PangoCairoFontMapIface;
Index: pango/pangocairo-render.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-render.c,v
retrieving revision 1.9
diff -u -p -r1.9 pangocairo-render.c
--- pango/pangocairo-render.c	3 Oct 2005 02:48:29 -0000	1.9
+++ pango/pangocairo-render.c	6 Dec 2005 01:20:27 -0000
@@ -92,11 +92,33 @@ pango_cairo_renderer_draw_glyphs (PangoR
 
       if (gi->glyph)
 	{
-	  cairo_glyphs[count].index = gi->glyph;
-	  cairo_glyphs[count].x = crenderer->x_offset + (double)(x + x_position + gi->geometry.x_offset) / PANGO_SCALE;
-	  cairo_glyphs[count].y = crenderer->y_offset + (double)(y + gi->geometry.y_offset) / PANGO_SCALE;
+	  if (gi->glyph & PANGO_CAIRO_UNKNOWN_FLAG)
+	    {
+	      int mini_pad = gi->geometry.width / 10;
+	      /* draw an empty dashed box, no hexbox for now */
+	      cairo_rectangle (crenderer->cr,
+			       crenderer->x_offset + (double)(x + x_position + mini_pad) / PANGO_SCALE,
+			       crenderer->y_offset + (double)(y - mini_pad) / PANGO_SCALE, 
+			       (double)(gi->geometry.width - 2 * mini_pad) / PANGO_SCALE,
+			       -(double)(gi->geometry.width - 2 * mini_pad) / PANGO_SCALE);
+	      if (!crenderer->do_path)
+		{
+		  double dash = (double)mini_pad * 2 / PANGO_SCALE;
+		  cairo_save (crenderer->cr);
+		  cairo_set_line_width (crenderer->cr, (double)mini_pad / PANGO_SCALE);
+		  cairo_set_dash (crenderer->cr, &dash, 1, 0);
+		  cairo_stroke (crenderer->cr);
+		  cairo_restore (crenderer->cr);
+		}
+	    }
+	  else
+	    {
+	      cairo_glyphs[count].index = gi->glyph;
+	      cairo_glyphs[count].x = crenderer->x_offset + (double)(x + x_position + gi->geometry.x_offset) / PANGO_SCALE;
+	      cairo_glyphs[count].y = crenderer->y_offset + (double)(y + gi->geometry.y_offset) / PANGO_SCALE;
 
-	  count++;
+	      count++;
+	    }
 	}
 	  
       x_position += gi->geometry.width;

