Index: modules/arabic/arabic-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/arabic/arabic-fc.c,v
retrieving revision 1.24
diff -u -p -r1.24 arabic-fc.c
--- modules/arabic/arabic-fc.c	29 Jan 2006 23:06:51 -0000	1.24
+++ modules/arabic/arabic-fc.c	2 Feb 2006 09:34:09 -0000
@@ -209,13 +209,13 @@ fallback_shape (PangoEngineShape *engine
 
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
 	  index = pango_fc_font_get_glyph (fc_font, wc);
 
-	  if (!index)
+	  if (index == PANGO_GLYPH_NULL)
 	    index = pango_fc_font_get_unknown_glyph (fc_font, wc);
 
 	  set_glyph (font, glyphs, i, p - text, index);
Index: modules/basic/basic-atsui.c
===================================================================
RCS file: /cvs/gnome/pango/modules/basic/basic-atsui.c,v
retrieving revision 1.2
diff -u -p -r1.2 basic-atsui.c
--- modules/basic/basic-atsui.c	14 Jan 2006 07:00:05 -0000	1.2
+++ modules/basic/basic-atsui.c	2 Feb 2006 09:34:10 -0000
@@ -160,7 +160,7 @@ basic_engine_shape (PangoEngineShape *en
       
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
Index: modules/basic/basic-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/basic/basic-fc.c,v
retrieving revision 1.26
diff -u -p -r1.26 basic-fc.c
--- modules/basic/basic-fc.c	29 Jan 2006 23:06:57 -0000	1.26
+++ modules/basic/basic-fc.c	2 Feb 2006 09:34:10 -0000
@@ -166,13 +166,13 @@ fallback_shape (PangoEngineShape *engine
 
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
 	  index = pango_fc_font_get_glyph (fc_font, wc);
 
-	  if (!index)
+	  if (index == PANGO_GLYPH_NULL)
             {
 	      index = pango_fc_font_get_unknown_glyph (fc_font, wc);
               set_glyph (font, glyphs, i, p - text, index);
Index: modules/basic/basic-win32.c
===================================================================
RCS file: /cvs/gnome/pango/modules/basic/basic-win32.c,v
retrieving revision 1.39
diff -u -p -r1.39 basic-win32.c
--- modules/basic/basic-win32.c	14 Jan 2006 07:00:05 -0000	1.39
+++ modules/basic/basic-win32.c	2 Feb 2006 09:34:10 -0000
@@ -1003,12 +1003,12 @@ basic_engine_shape (PangoEngineShape *en
 		
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
 	  index = find_char (font, wc);
-	  if (index)
+	  if (index != PANGO_GLYPH_NULL)
 	    {
 	      set_glyph (font, glyphs, i, p - text, index);
 	      
Index: modules/basic/basic-x.c
===================================================================
RCS file: /cvs/gnome/pango/modules/basic/basic-x.c,v
retrieving revision 1.41
diff -u -p -r1.41 basic-x.c
--- modules/basic/basic-x.c	14 Jan 2006 07:00:05 -0000	1.41
+++ modules/basic/basic-x.c	2 Feb 2006 09:34:10 -0000
@@ -284,7 +284,7 @@ find_char (CharCache *cache, PangoFont *
 	}
     }
 
-  return 0;
+  return PANGO_GLYPH_NULL;
 }
 
 static void
@@ -610,12 +610,12 @@ basic_engine_shape (PangoEngineShape *en
 		
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
 	  index = find_char (cache, font, wc, input);
-	  if (index)
+	  if (index != PANGO_GLYPH_NULL)
 	    {
 	      set_glyph (font, glyphs, i, p - text, index);
 	      
@@ -640,7 +640,7 @@ basic_engine_shape (PangoEngineShape *en
 		}
 	    }
 	  else
-	    set_glyph (font, glyphs, i, p - text, pango_x_get_unknown_glyph (font));
+	    set_glyph (font, glyphs, i, p - text, pango_x_font_get_unknown_glyph (font, wc));
 	}
       
       p = g_utf8_next_char (p);
@@ -680,7 +680,7 @@ basic_engine_covers (PangoEngineShape *e
 
   g_unichar_to_utf8 (wc, buf);
 
-  return find_char (cache, font, wc, buf) ? PANGO_COVERAGE_EXACT : PANGO_COVERAGE_NONE;
+  return find_char (cache, font, wc, buf) != PANGO_GLYPH_NULL ? PANGO_COVERAGE_EXACT : PANGO_COVERAGE_NONE;
 }
 
 static void
Index: modules/hangul/hangul-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/hangul/hangul-fc.c,v
retrieving revision 1.20
diff -u -p -r1.20 hangul-fc.c
--- modules/hangul/hangul-fc.c	14 Jan 2006 07:00:05 -0000	1.20
+++ modules/hangul/hangul-fc.c	2 Feb 2006 09:34:10 -0000
@@ -138,7 +138,7 @@ render_tone (PangoFont *font, gunichar t
 
   index = find_char (font, tone);
   pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
-  if (index)
+  if (index != PANGO_GLYPH_NULL)
     {
       set_glyph_tone (font, glyphs, *n_glyphs, cluster_offset, index);
     }
@@ -146,7 +146,7 @@ render_tone (PangoFont *font, gunichar t
     {
       /* fall back : HTONE1(0x302e) => middle-dot, HTONE2(0x302f) => colon */
       index = find_char (font, tone == HTONE1 ? 0x00b7 : 0x003a);
-      if (index)
+      if (index != PANGO_GLYPH_NULL)
         {
           set_glyph_tone (font, glyphs, *n_glyphs, cluster_offset, index);
         }
@@ -167,11 +167,11 @@ render_isolated_tone (PangoFont *font, g
   /* Find a base character to render the mark on
    */
   int index = find_char (font, 0x25cc);	/* DOTTED CIRCLE */
-  if (!index)
+  if (index == PANGO_GLYPH_NULL)
     index = find_char (font, 0x25cb);   /* WHITE CIRCLE, in KSC-5601 */
-  if (!index)
+  if (index == PANGO_GLYPH_NULL)
     index = find_char (font, ' ');      /* Space */
-  if (!index)			        /* Unknown glyph box with 0000 in it */
+  if (index == PANGO_GLYPH_NULL)        /* Unknown glyph box with 0000 in it */
     index = find_char (font, get_unknown_glyph (font, 0));
 
   /* Add the base character
@@ -217,7 +217,7 @@ render_syllable (PangoFont *font, gunich
 	wc = S_FROM_LV(text[0], text[1]);
       index = find_char (font, wc);
       pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
-      if (!index)
+      if (index == PANGO_GLYPH_NULL)
 	set_glyph (font, glyphs, *n_glyphs, cluster_offset,
 		   get_unknown_glyph (font, wc));
       else
@@ -236,7 +236,7 @@ render_syllable (PangoFont *font, gunich
 	continue;
 
       index = find_char (font, text[i]);
-      if (index)
+      if (index != PANGO_GLYPH_NULL)
 	{
 	  pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
 	  set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
@@ -250,9 +250,9 @@ render_syllable (PangoFont *font, gunich
       for (j = 0; j < 3 && (__jamo_to_ksc5601[jindex][j] != 0); j++)
 	{
 	  wc = __jamo_to_ksc5601[jindex][j] - KSC_JAMOBASE + UNI_JAMOBASE;
-	  index = (wc >= 0x3131) ? find_char (font, wc) : 0;
+	  index = (wc >= 0x3131) ? find_char (font, wc) : PANGO_GLYPH_NULL;
 	  pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
-	  if (!index)
+	  if (index == PANGO_GLYPH_NULL)
 	    set_glyph (font, glyphs, *n_glyphs, cluster_offset,
 		       get_unknown_glyph (font, index));
 	  else
@@ -264,7 +264,7 @@ render_syllable (PangoFont *font, gunich
     {
       index = find_char (font, 0x3164);
       pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
-      if (!index)
+      if (index == PANGO_GLYPH_NULL)
 	set_glyph (font, glyphs, *n_glyphs, cluster_offset,
 		   get_unknown_glyph (font, index));
       else
@@ -287,12 +287,12 @@ render_basic (PangoFont *font, gunichar 
 
   index = find_char (font, wc);
   pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
-  if (index)
+  if (index != PANGO_GLYPH_NULL)
     set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
   else
     {
       if (pango_is_zero_width (wc))
-	set_glyph (font, glyphs, *n_glyphs, cluster_offset, 0);
+	set_glyph (font, glyphs, *n_glyphs, cluster_offset, PANGO_GLYPH_NULL);
       else
 	set_glyph (font, glyphs, *n_glyphs, cluster_offset,
 		   get_unknown_glyph (font, wc));
Index: modules/hebrew/hebrew-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/hebrew/hebrew-fc.c,v
retrieving revision 1.15
diff -u -p -r1.15 hebrew-fc.c
--- modules/hebrew/hebrew-fc.c	29 Jan 2006 23:06:57 -0000	1.15
+++ modules/hebrew/hebrew-fc.c	2 Feb 2006 09:34:10 -0000
@@ -348,13 +348,13 @@ hebrew_engine_shape (PangoEngineShape *e
 
       if (pango_is_zero_width (wc))	/* Zero-width characters */
 	{
-	  pango_ot_buffer_add_glyph (buffer, 0, unknown_property, p - text);
+	  pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_NULL, unknown_property, p - text);
 	}
       else
 	{
 	  index = pango_fc_font_get_glyph (fc_font, wc);
 	  
-	  if (!index)
+	  if (index == PANGO_GLYPH_NULL)
 	    {
 	      pango_ot_buffer_add_glyph (buffer, pango_fc_font_get_unknown_glyph (fc_font, wc),
 					 unknown_property, p - text);
Index: modules/indic/indic-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/indic/indic-fc.c,v
retrieving revision 1.21
diff -u -p -r1.21 indic-fc.c
--- modules/indic/indic-fc.c	29 Jan 2006 23:06:57 -0000	1.21
+++ modules/indic/indic-fc.c	2 Feb 2006 09:34:10 -0000
@@ -272,12 +272,12 @@ set_glyphs (PangoFont      *font,
 
       if (pango_is_zero_width (wcs[i]) &&
 	  (!process_zwj || wcs[i] != 0x200D))
-	glyph = 0;
+	glyph = PANGO_GLYPH_NULL;
       else
         {
 	  glyph = pango_fc_font_get_glyph (fc_font, wcs[i]);
 
-	  if (!glyph)
+	  if (glyph == PANGO_GLYPH_NULL)
 	    glyph = pango_fc_font_get_unknown_glyph (fc_font, wcs[i]);
 
           pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
Index: modules/khmer/khmer-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/khmer/khmer-fc.c,v
retrieving revision 1.8
diff -u -p -r1.8 khmer-fc.c
--- modules/khmer/khmer-fc.c	29 Jan 2006 23:06:58 -0000	1.8
+++ modules/khmer/khmer-fc.c	2 Feb 2006 09:34:10 -0000
@@ -508,7 +508,7 @@ static PangoGlyph
 get_index (PangoFcFont *fc_font, gunichar wc)
 {
   PangoGlyph index = pango_fc_font_get_glyph (fc_font, wc);
-  if (!index)
+  if (index == PANGO_GLYPH_NULL)
     index = pango_fc_font_get_unknown_glyph (fc_font, wc);
   return index;
 }
Index: modules/syriac/syriac-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/syriac/syriac-fc.c,v
retrieving revision 1.8
diff -u -p -r1.8 syriac-fc.c
--- modules/syriac/syriac-fc.c	29 Jan 2006 23:06:58 -0000	1.8
+++ modules/syriac/syriac-fc.c	2 Feb 2006 09:34:10 -0000
@@ -201,13 +201,13 @@ fallback_shape (PangoEngineShape *engine
 
       if (pango_is_zero_width (wc))
 	{
-	  set_glyph (font, glyphs, i, p - text, 0);
+	  set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
 	}
       else
 	{
 	  index = pango_fc_font_get_glyph (fc_font, wc);
 
-	  if (!index)
+	  if (index == PANGO_GLYPH_NULL)
 	    index = pango_fc_font_get_unknown_glyph (fc_font, wc);
 
 	  set_glyph (font, glyphs, i, p - text, index);
Index: modules/thai/thai-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/thai/thai-fc.c,v
retrieving revision 1.20
diff -u -p -r1.20 thai-fc.c
--- modules/thai/thai-fc.c	14 Jan 2006 07:00:09 -0000	1.20
+++ modules/thai/thai-fc.c	2 Feb 2006 09:34:10 -0000
@@ -228,7 +228,7 @@ thai_make_glyph_uni (ThaiFontInfo *font_
   PangoFcFont *fc_font = (PangoFcFont *)font_info->font;
 
   result = pango_fc_font_get_glyph (fc_font, uc);
-  if (result)
+  if (result != PANGO_GLYPH_NULL)
     return result;
   else
     return pango_fc_font_get_unknown_glyph (fc_font, uc);
Index: modules/tibetan/tibetan-fc.c
===================================================================
RCS file: /cvs/gnome/pango/modules/tibetan/tibetan-fc.c,v
retrieving revision 1.4
diff -u -p -r1.4 tibetan-fc.c
--- modules/tibetan/tibetan-fc.c	29 Jan 2006 23:06:59 -0000	1.4
+++ modules/tibetan/tibetan-fc.c	2 Feb 2006 09:34:11 -0000
@@ -473,7 +473,7 @@ static PangoGlyph
 get_index (PangoFcFont *fc_font, gunichar wc)
 {
   PangoGlyph index = pango_fc_font_get_glyph (fc_font, wc);
-  if (!index)
+  if (index == PANGO_GLYPH_NULL)
     index = pango_fc_font_get_unknown_glyph (fc_font, wc);
   return index;
 }
Index: pango/pango-types.h
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-types.h,v
retrieving revision 1.28
diff -u -p -r1.28 pango-types.h
--- pango/pango-types.h	21 Jan 2006 19:51:25 -0000	1.28
+++ pango/pango-types.h	2 Feb 2006 09:34:11 -0000
@@ -45,6 +45,9 @@ typedef struct _PangoLanguage PangoLangu
  */
 typedef guint32 PangoGlyph;
 
+#define PANGO_GLYPH_UNKNOWN_FLAG ((PangoGlyph)0x10000000)
+#define PANGO_GLYPH_NULL         ((PangoGlyph)0xFFFFFFFF)
+
 /* A rectangle. Used to store logical and physical extents of glyphs,
  * runs, strings, etc.
  */
Index: pango/pangocairo-fcfont.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-fcfont.c,v
retrieving revision 1.26
diff -u -p -r1.26 pangocairo-fcfont.c
--- pango/pangocairo-fcfont.c	29 Jan 2006 23:06:59 -0000	1.26
+++ pango/pangocairo-fcfont.c	2 Feb 2006 09:34:11 -0000
@@ -346,13 +346,6 @@ pango_cairo_fc_font_get_glyph (PangoFcFo
   return entry->glyph;
 }
 
-static PangoGlyph
-pango_cairo_fc_font_real_get_unknown_glyph (PangoFcFont *font,
-					    gunichar     wc)
-{
-  return wc | PANGO_CAIRO_UNKNOWN_FLAG;
-}
-
 static void
 pango_cairo_fc_font_glyph_extents_cache_init (PangoCairoFcFont *cffont)
 {
@@ -445,12 +438,7 @@ pango_cairo_fc_font_get_glyph_extents (P
   if (cffont->glyph_extents_cache == NULL)
     pango_cairo_fc_font_glyph_extents_cache_init (cffont);
 
-  if (glyph & PANGO_CAIRO_UNKNOWN_FLAG) 
-    {
-      _pango_cairo_get_glyph_extents_missing((PangoCairoFont *)font, glyph, ink_rect, logical_rect);
-      return;
-    }
-  else if (!glyph)
+  if (glyph == PANGO_GLYPH_NULL)
     {
       if (ink_rect)
 	*ink_rect = cffont->font_extents;
@@ -458,6 +446,11 @@ pango_cairo_fc_font_get_glyph_extents (P
 	*logical_rect = cffont->font_extents;
       return;
     }
+  else if (glyph & PANGO_GLYPH_UNKNOWN_FLAG) 
+    {
+      _pango_cairo_get_glyph_extents_missing((PangoCairoFont *)font, glyph, ink_rect, logical_rect);
+      return;
+    }
 
   entry = pango_cairo_fc_font_get_glyph_extents_cache_entry (cffont, glyph);
 
@@ -514,7 +507,6 @@ pango_cairo_fc_font_class_init (PangoCai
   fc_font_class->lock_face = pango_cairo_fc_font_lock_face;
   fc_font_class->unlock_face = pango_cairo_fc_font_unlock_face;
   fc_font_class->get_glyph = pango_cairo_fc_font_get_glyph;
-  fc_font_class->get_unknown_glyph = pango_cairo_fc_font_real_get_unknown_glyph;
   fc_font_class->shutdown = pango_cairo_fc_font_shutdown;
 
 #ifdef PROFILE_GLYPH_CACHE
Index: pango/pangocairo-font.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-font.c,v
retrieving revision 1.14
diff -u -p -r1.14 pangocairo-font.c
--- pango/pangocairo-font.c	2 Feb 2006 02:01:41 -0000	1.14
+++ pango/pangocairo-font.c	2 Feb 2006 09:34:11 -0000
@@ -255,7 +255,7 @@ _pango_cairo_get_glyph_extents_missing (
   hbi = _pango_cairo_get_hex_box_info (cfont);
 
   rows = hbi->rows;
-  cols = ((glyph & ~PANGO_CAIRO_UNKNOWN_FLAG) > 0xffff ? 6 : 4) / rows;
+  cols = ((glyph & ~PANGO_GLYPH_UNKNOWN_FLAG) > 0xffff ? 6 : 4) / rows;
   
   if (ink_rect)
     {
Index: pango/pangocairo-private.h
===================================================================
RCS file: /cvs/gnome/pango/pango/pangocairo-private.h,v
retrieving revision 1.9
diff -u -p -r1.9 pangocairo-private.h
--- pango/pangocairo-private.h	1 Feb 2006 02:35:18 -0000	1.9
+++ pango/pangocairo-private.h	2 Feb 2006 09:34:11 -0000
@@ -27,8 +27,6 @@
 
 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.13
diff -u -p -r1.13 pangocairo-render.c
--- pango/pangocairo-render.c	1 Feb 2006 02:35:18 -0000	1.13
+++ pango/pangocairo-render.c	2 Feb 2006 09:34:11 -0000
@@ -76,7 +76,7 @@ _pango_cairo_renderer_draw_unknown_glyph
 
   hbi = _pango_cairo_get_hex_box_info ((PangoCairoFont *)font);      
 
-  ch = gi->glyph & ~PANGO_CAIRO_UNKNOWN_FLAG;
+  ch = gi->glyph & ~PANGO_GLYPH_UNKNOWN_FLAG;
 
   rows = hbi->rows;
   cols = (ch > 0xffff ? 6 : 4) / rows;
@@ -160,12 +160,12 @@ pango_cairo_renderer_draw_glyphs (PangoR
     {
       PangoGlyphInfo *gi = &glyphs->glyphs[i];
 
-      if (gi->glyph)
+      if (gi->glyph != PANGO_GLYPH_NULL)
         {
           double cx = crenderer->x_offset + (double)(x + x_position + gi->geometry.x_offset) / PANGO_SCALE;
           double cy = crenderer->y_offset + (double)(y + gi->geometry.y_offset) / PANGO_SCALE;
 
-          if (gi->glyph & PANGO_CAIRO_UNKNOWN_FLAG)
+          if (gi->glyph & PANGO_GLYPH_UNKNOWN_FLAG)
 	    _pango_cairo_renderer_draw_unknown_glyph (crenderer, font, gi, cx, cy);
           else
             {
Index: pango/pangofc-decoder.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangofc-decoder.c,v
retrieving revision 1.7
diff -u -p -r1.7 pangofc-decoder.c
--- pango/pangofc-decoder.c	14 Jan 2006 07:00:11 -0000	1.7
+++ pango/pangofc-decoder.c	2 Feb 2006 09:34:11 -0000
@@ -70,8 +70,8 @@ pango_fc_decoder_get_charset (PangoFcDec
  * glyph is most convenient for it. (Usually whatever glyph is directly
  * in the fonts character map table.)
  *
- * Return value: the glyph index, or 0 if the glyph isn't covered
- *  by the font.
+ * Return value: the glyph index, or %PANGO_GLYPH_NULL if the glyph isn't
+ * covered by the font.
  *
  * Since: 1.6
  **/
@@ -80,7 +80,7 @@ pango_fc_decoder_get_glyph (PangoFcDecod
 			    PangoFcFont    *fcfont,
 			    guint32         wc)
 {
-  g_return_val_if_fail (PANGO_IS_FC_DECODER (decoder), 0);
+  g_return_val_if_fail (PANGO_IS_FC_DECODER (decoder), PANGO_GLYPH_NULL);
 
   return PANGO_FC_DECODER_GET_CLASS (decoder)->get_glyph (decoder, fcfont, wc);
 }
Index: pango/pangofc-font.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangofc-font.c,v
retrieving revision 1.28
diff -u -p -r1.28 pangofc-font.c
--- pango/pangofc-font.c	29 Jan 2006 23:06:59 -0000	1.28
+++ pango/pangofc-font.c	2 Feb 2006 09:34:11 -0000
@@ -82,6 +82,7 @@ pango_fc_font_class_init (PangoFcFontCla
 
   class->has_char = pango_fc_font_real_has_char;
   class->get_glyph = pango_fc_font_real_get_glyph;
+  class->get_unknown_glyph = NULL;
   
   object_class->finalize = pango_fc_font_finalize;
   object_class->set_property = pango_fc_font_set_property;
@@ -517,7 +518,7 @@ pango_fc_font_real_get_glyph (PangoFcFon
   
   index = FcFreeTypeCharIndex (face, wc);
   if (index > (FT_UInt)face->num_glyphs)
-    index = 0;
+    index = PANGO_GLYPH_NULL;
 
   PANGO_FC_FONT_UNLOCK_FACE (font);
 
@@ -599,7 +600,7 @@ pango_fc_font_has_char (PangoFcFont *fon
  * for @font. If you only want to determine
  * whether the font has the glyph, use pango_fc_font_has_char().
  * 
- * Return value: the glyph index, or 0, if the Unicode
+ * Return value: the glyph index, or %PANGO_GLYPH_NULL, if the Unicode
  *   character doesn't exist in the font.
  *
  * Since: 1.4
@@ -641,7 +642,10 @@ pango_fc_font_get_unknown_glyph (PangoFc
 {
   g_return_val_if_fail (PANGO_IS_FC_FONT (font), 0);
 
-  return PANGO_FC_FONT_GET_CLASS (font)->get_unknown_glyph (font, wc);
+  if (PANGO_FC_FONT_GET_CLASS (font)->get_unknown_glyph)
+    return PANGO_FC_FONT_GET_CLASS (font)->get_unknown_glyph (font, wc);
+
+  return PANGO_GLYPH_UNKNOWN_FLAG | (PangoGlyph)wc;
 }
 
 void
Index: pango/pangowin32.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangowin32.c,v
retrieving revision 1.63
diff -u -p -r1.63 pangowin32.c
--- pango/pangowin32.c	28 Jan 2006 20:02:01 -0000	1.63
+++ pango/pangowin32.c	2 Feb 2006 09:34:11 -0000
@@ -31,8 +31,6 @@
 #include "pangowin32.h"
 #include "pangowin32-private.h"
 
-#define PANGO_WIN32_UNKNOWN_FLAG 0x10000000
-
 #define CH_IS_UNIHAN_BMP(ch) ((ch) >= 0x3400 && (ch) <= 0x9FFF)
 #define CH_IS_UNIHAN(ch) (CH_IS_UNIHAN_BMP (ch) || \
 			  ((ch) >= 0x20000 && (ch) <= 0x2A6DF) ||	\
@@ -313,11 +311,11 @@ pango_win32_render (HDC               hd
        * point zero (just spacing).
        */
       while (i < glyphs->num_glyphs &&
-	     (glyphs->glyphs[i].glyph == 0 || cur_y_offset == glyphs->glyphs[i].geometry.y_offset))
+	     (glyphs->glyphs[i].glyph == PANGO_GLYPH_NULL || cur_y_offset == glyphs->glyphs[i].geometry.y_offset))
 	{
-	  if (glyphs->glyphs[i].glyph == 0)
+	  if (glyphs->glyphs[i].glyph == PANGO_GLYPH_NULL)
 	    {
-	      /* Code point 0 glyphs should not be rendered, but their
+	      /* PANGO_GLYPH_NULL glyphs should not be rendered, but their
 	       * indicated width (set up by PangoLayout) should be taken
 	       * into account.
 	       */
@@ -337,7 +335,7 @@ pango_win32_render (HDC               hd
 	    }
 	  else
 	    {
-	      if (glyphs->glyphs[i].glyph & PANGO_WIN32_UNKNOWN_FLAG)
+	      if (glyphs->glyphs[i].glyph & PANGO_GLYPH_UNKNOWN_FLAG)
 		{
 		  /* Glyph index is actually the char value that doesn't
 		   * have any glyph (ORed with the flag). We should really
@@ -462,7 +460,7 @@ pango_win32_font_get_glyph_extents (Pang
   MAT2 m = {{0,1}, {0,0}, {0,0}, {0,1}};
   PangoWin32GlyphInfo *info;
 
-  if (glyph & PANGO_WIN32_UNKNOWN_FLAG)
+  if (glyph & PANGO_GLYPH_UNKNOWN_FLAG)
     glyph_index = glyph = 0;
 
   info = g_hash_table_lookup (win32font->glyph_info, GUINT_TO_POINTER (glyph));
@@ -869,7 +867,7 @@ PangoGlyph
 pango_win32_get_unknown_glyph (PangoFont *font,
 			       gunichar   wc)
 {
-  return wc | PANGO_WIN32_UNKNOWN_FLAG;
+  return wc | PANGO_GLYPH_UNKNOWN_FLAG;
 }
 
 /**
@@ -1383,7 +1381,7 @@ pango_win32_font_get_glyph_index (PangoF
   cmap = font_get_cmap (font);
 
   if (cmap == NULL)
-    return 0;
+    return PANGO_GLYPH_NULL;
 
   if (win32font->win32face->cmap_format == 4)
     {
@@ -1396,10 +1394,10 @@ pango_win32_font_get_glyph_index (PangoF
       guint16 ch = wc;
   
       if (wc > 0xFFFF)
-	return 0;
+	return PANGO_GLYPH_NULL;
 
       if (!find_segment (cmap4, ch, &segment))
-	return 0;
+	return PANGO_GLYPH_NULL;
 
       id_range_offset = get_id_range_offset (cmap4);
       id_delta = get_id_delta (cmap4);
@@ -1415,7 +1413,7 @@ pango_win32_font_get_glyph_index (PangoF
 	  if (id)
 	    glyph = (id_delta[segment] + id) %65536;
 	  else
-	    glyph = 0;
+	    glyph = PANGO_GLYPH_NULL;
 	}
     }
   else if (win32font->win32face->cmap_format == 12)
@@ -1423,7 +1421,7 @@ pango_win32_font_get_glyph_index (PangoF
       struct format_12_cmap *cmap12 = cmap;
       guint32 i;
 
-      glyph = 0;
+      glyph = PANGO_GLYPH_NULL;
       for (i = 0; i < cmap12->count; i++)
 	{
 	  if (cmap12->groups[i*3+0] <= wc && wc <= cmap12->groups[i*3+1])
Index: pango/pangox.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangox.c,v
retrieving revision 1.91
diff -u -p -r1.91 pangox.c
--- pango/pangox.c	14 Jan 2006 07:00:11 -0000	1.91
+++ pango/pangox.c	2 Feb 2006 09:34:12 -0000
@@ -33,8 +33,6 @@
 #include "pangox.h"
 #include "pangox-private.h"
 
-#define PANGO_X_UNKNOWN_FLAG 0x10000000
-
 #define PANGO_TYPE_X_FONT              (pango_x_font_get_type ())
 #define PANGO_X_FONT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_X_FONT, PangoXFont))
 #define PANGO_X_FONT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_X_FONT, PangoXFontClass))
@@ -401,12 +399,12 @@ pango_x_render  (Display           *disp
        * the ink rect here would be a noticeable speed hit.
        * This is close enough.
        */
-      if (!(glyph &&
+      if (!(glyph != PANGO_GLYPH_NULL &&
 	    glyph_x >= -16384 && glyph_x <= 32767 &&
 	    glyph_y >= -16384 && glyph_y <= 32767))
 	goto next_glyph;
 	      
-      if (glyph & PANGO_X_UNKNOWN_FLAG)
+      if (glyph & PANGO_GLYPH_UNKNOWN_FLAG)
         {
 	  PangoFontMetrics *metrics = pango_font_get_metrics (font,
 							      pango_language_from_string ("en"));
@@ -425,7 +423,7 @@ pango_x_render  (Display           *disp
           baseline = glyph_y;
 	  stroke_thick = MAX ((int) (0.5 + 0.075 * (y2 - y1)), 1);
           
-          wc = glyph & (~PANGO_X_UNKNOWN_FLAG);
+          wc = glyph & (~PANGO_GLYPH_UNKNOWN_FLAG);
 
           switch (wc)
             {
@@ -576,7 +574,7 @@ pango_x_font_get_glyph_extents  (PangoFo
   XCharStruct *cs;
   PangoXSubfontInfo *subfont;
 
-  if (glyph & PANGO_X_UNKNOWN_FLAG)
+  if (glyph != PANGO_GLYPH_NULL && glyph & PANGO_GLYPH_UNKNOWN_FLAG)
     {
       PangoFontMetrics *metrics = pango_font_get_metrics (font,
 							  pango_language_from_string ("en"));
@@ -584,7 +582,7 @@ pango_x_font_get_glyph_extents  (PangoFo
       gdouble width_factor;
       int w;
       
-      wc = glyph & (~PANGO_X_UNKNOWN_FLAG);
+      wc = glyph & (~PANGO_GLYPH_UNKNOWN_FLAG);
           
       switch (wc)
         {
@@ -625,7 +623,7 @@ pango_x_font_get_glyph_extents  (PangoFo
 	}
       
     }
-  else if (glyph && pango_x_find_glyph (font, glyph, &subfont, &cs))
+  else if (glyph != PANGO_GLYPH_NULL && pango_x_find_glyph (font, glyph, &subfont, &cs))
     {
       if (ink_rect)
 	{
@@ -852,7 +850,7 @@ get_subfonts_foreach (PangoFont      *fo
   GSList **subfonts = data;
   PangoGlyph glyph = glyph_info->glyph;
 
-  if ((glyph & PANGO_X_UNKNOWN_FLAG) == 0)
+  if ((glyph & PANGO_GLYPH_UNKNOWN_FLAG) == 0)
     {
       PangoXSubfont subfont = PANGO_X_GLYPH_SUBFONT (glyph);
       if (!g_slist_find (*subfonts, GUINT_TO_POINTER ((guint)subfont)))
@@ -1412,7 +1410,7 @@ pango_x_find_glyph (PangoFont *font,
 PangoGlyph
 pango_x_get_unknown_glyph (PangoFont *font)
 {
-  return PANGO_X_UNKNOWN_FLAG;
+  return PANGO_GLYPH_UNKNOWN_FLAG;
 }
 
 /**
@@ -1758,5 +1756,5 @@ pango_x_font_get_unknown_glyph (PangoFon
 {
   g_return_val_if_fail (PANGO_IS_FONT (font), 0);
 
-  return PANGO_X_UNKNOWN_FLAG | wc;
+  return PANGO_GLYPH_UNKNOWN_FLAG | wc;
 }
Index: pango/pangoxft-font.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangoxft-font.c,v
retrieving revision 1.67
diff -u -p -r1.67 pangoxft-font.c
--- pango/pangoxft-font.c	29 Jan 2006 23:06:59 -0000	1.67
+++ pango/pangoxft-font.c	2 Feb 2006 09:34:12 -0000
@@ -51,8 +51,6 @@ static gboolean   pango_xft_font_real_ha
 							 gunichar          wc);
 static guint      pango_xft_font_real_get_glyph         (PangoFcFont      *font,
 							 gunichar          wc);
-static PangoGlyph pango_xft_font_real_get_unknown_glyph (PangoFcFont      *font,
-							 gunichar          wc);
 static void       pango_xft_font_real_shutdown          (PangoFcFont      *font);
 
 static XftFont *xft_font_get_font (PangoFont *font);
@@ -74,7 +72,6 @@ pango_xft_font_class_init (PangoXftFontC
   fc_font_class->unlock_face = pango_xft_font_real_unlock_face;
   fc_font_class->has_char = pango_xft_font_real_has_char;
   fc_font_class->get_glyph = pango_xft_font_real_get_glyph;
-  fc_font_class->get_unknown_glyph = pango_xft_font_real_get_unknown_glyph;
   fc_font_class->shutdown = pango_xft_font_real_shutdown;
 }
 
@@ -209,7 +206,7 @@ get_glyph_extents_missing (PangoXftFont 
   PangoFont *font = PANGO_FONT (xfont);
   XftFont *xft_font = xft_font_get_font (font);
   
-  gint cols = (glyph & ~PANGO_XFT_UNKNOWN_FLAG) > 0xffff ? 3 : 2;
+  gint cols = (glyph & ~PANGO_GLYPH_UNKNOWN_FLAG) > 0xffff ? 3 : 2;
   
   _pango_xft_font_get_mini_font (xfont);
   
@@ -323,21 +320,7 @@ pango_xft_font_get_glyph_extents (PangoF
   if (!fcfont->fontmap)		/* Display closed */
     goto fallback;
 
-  if (glyph == (PangoGlyph)-1)
-    glyph = 0;
-
-  if (glyph & PANGO_XFT_UNKNOWN_FLAG)
-    {
-      get_glyph_extents_missing (xfont, glyph, ink_rect, logical_rect);
-    }
-  else if (glyph)
-    {
-      if (!fcfont->is_transformed)
-	get_glyph_extents_xft (fcfont, glyph, ink_rect, logical_rect);
-      else
-	get_glyph_extents_raw (xfont, glyph, ink_rect, logical_rect);
-    }
-  else
+  if (glyph == PANGO_GLYPH_NULL)
     {
     fallback:
       
@@ -355,6 +338,18 @@ pango_xft_font_get_glyph_extents (PangoF
 	  logical_rect->y = 0;
 	  logical_rect->height = 0;
 	}
+      return;
+    }
+  else if (glyph & PANGO_GLYPH_UNKNOWN_FLAG)
+    {
+      get_glyph_extents_missing (xfont, glyph, ink_rect, logical_rect);
+    }
+  else
+    {
+      if (!fcfont->is_transformed)
+	get_glyph_extents_xft (fcfont, glyph, ink_rect, logical_rect);
+      else
+	get_glyph_extents_raw (xfont, glyph, ink_rect, logical_rect);
     }
 }
 
@@ -453,13 +448,6 @@ pango_xft_font_real_get_glyph (PangoFcFo
   return XftCharIndex (NULL, xft_font, wc);
 }
 
-static PangoGlyph
-pango_xft_font_real_get_unknown_glyph (PangoFcFont *font,
-				       gunichar     wc)
-{
-  return wc | PANGO_XFT_UNKNOWN_FLAG;
-}
-
 static void
 pango_xft_font_real_shutdown (PangoFcFont *fcfont)
 {
@@ -586,7 +574,7 @@ pango_xft_font_unlock_face (PangoFont *f
  * 
  * Use pango_fc_font_get_glyph() instead.
  *
- * Return value: the glyph index, or 0, if the Unicode
+ * Return value: the glyph index, or %PANGO_GLYPH_NULL, if the Unicode
  *  character does not exist in the font.
  *
  * Since: 1.2
@@ -595,7 +583,7 @@ guint
 pango_xft_font_get_glyph (PangoFont *font,
 			  gunichar   wc)
 {
-  g_return_val_if_fail (PANGO_XFT_IS_FONT (font), 0);
+  g_return_val_if_fail (PANGO_XFT_IS_FONT (font), PANGO_GLYPH_NULL);
 
   return pango_fc_font_get_glyph (PANGO_FC_FONT (font), wc);
 }
Index: pango/pangoxft-private.h
===================================================================
RCS file: /cvs/gnome/pango/pango/pangoxft-private.h,v
retrieving revision 1.14
diff -u -p -r1.14 pangoxft-private.h
--- pango/pangoxft-private.h	24 Sep 2004 17:40:46 -0000	1.14
+++ pango/pangoxft-private.h	2 Feb 2006 09:34:12 -0000
@@ -27,8 +27,6 @@
 
 G_BEGIN_DECLS
 
-#define PANGO_XFT_UNKNOWN_FLAG 0x10000000
-
 struct _PangoXftFont
 {
   PangoFcFont parent_instance;
Index: pango/pangoxft-render.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangoxft-render.c,v
retrieving revision 1.11
diff -u -p -r1.11 pangoxft-render.c
--- pango/pangoxft-render.c	31 Jan 2006 19:50:27 -0000	1.11
+++ pango/pangoxft-render.c	2 Feb 2006 09:34:12 -0000
@@ -335,9 +335,9 @@ pango_xft_renderer_draw_glyphs (PangoRen
       int glyph_x = x + x_off + glyphs->glyphs[i].geometry.x_offset;
       int glyph_y = y + glyphs->glyphs[i].geometry.y_offset;
 
-      if (glyph)
+      if (glyph != PANGO_GLYPH_NULL)
 	{
-	  if (glyph & PANGO_XFT_UNKNOWN_FLAG)
+	  if (glyph & PANGO_GLYPH_UNKNOWN_FLAG)
 	    {
 	      char buf[7];
 	      int ys[3];
@@ -348,7 +348,7 @@ pango_xft_renderer_draw_glyphs (PangoRen
 	      PangoFont *mini_font = _pango_xft_font_get_mini_font (xfont);
 	      XftFont *mini_xft_font = pango_xft_font_get_font (mini_font);
 	      
-	      glyph &= ~PANGO_XFT_UNKNOWN_FLAG;
+	      glyph &= ~PANGO_GLYPH_UNKNOWN_FLAG;
 	      
 	      ys[0] = glyph_y - PANGO_SCALE * xft_font->ascent + PANGO_SCALE * (((xft_font->ascent + xft_font->descent) - (xfont->mini_height * 2 + xfont->mini_pad * 5 + PANGO_SCALE / 2) / PANGO_SCALE) / 2);
 	      ys[1] = ys[0] + 2 * xfont->mini_pad + xfont->mini_height;

