diff --git a/ChangeLog b/ChangeLog index 72016f1e9..71e29b6ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-04-24 David Turner + + * src/pcf/pcfread.c (pcf_load_font): fixed the computation of + face->num_glyphs, this required increase the value by 1 to respect + the convention that gindex 0 always corresponds to the "missing + glyph". + 2003-04-24 Werner Lemberg * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@. diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 8e89acec0..ff11a8616 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -972,7 +972,13 @@ THE SOFTWARE. else root->family_name = 0; - root->num_glyphs = face->nmetrics; + /* note: we shift all glyph indices by +1 since we must + * respect the convention that glyph 0 always correspond + * to the "missing glyph". + * + * this implies bumping the number of "available" glyphs by 1 + */ + root->num_glyphs = face->nmetrics + 1; root->num_fixed_sizes = 1; if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )