(update_glyph_area): Use non_pixmap for
authorhanda <handa>
Thu, 22 Dec 2005 07:15:57 +0000 (07:15 +0000)
committerhanda <handa>
Thu, 22 Dec 2005 07:15:57 +0000 (07:15 +0000)
non-existing glyphs.

example/otfview.c

index dd63a7c..ab8685a 100644 (file)
@@ -211,9 +211,14 @@ update_glyph_area ()
 
       if (charmap_index >= 0)
        index = FT_Get_Char_Index (face, (FT_ULong) index);
-      if (! bitmap[index].pixmap)
-       create_pixmap (index);
-      XtSetArg (arg[0], XtNbitmap, bitmap[index].pixmap);
+      if (! index)
+       XtSetArg (arg[0], XtNbitmap, none_pixmap);
+      else
+       {
+         if (! bitmap[index].pixmap)
+           create_pixmap (index);
+         XtSetArg (arg[0], XtNbitmap, bitmap[index].pixmap);
+       }
       XtSetValues (glyph[i], arg, 1);
     }