From a31f8ff1b8d6261c92db1c5cd347689e040ef6e6 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 22 Dec 2005 07:15:57 +0000 Subject: [PATCH] (update_glyph_area): Use non_pixmap for non-existing glyphs. --- example/otfview.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/example/otfview.c b/example/otfview.c index dd63a7c..ab8685a 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -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); } -- 1.7.10.4