* 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".
This commit is contained in:
David Turner 2003-04-24 21:12:18 +00:00
parent 9e7f643ae3
commit 748c8b30af
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2003-04-24 David Turner <david@freetype.org>
* 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 <wl@gnu.org>
* builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@.

View File

@ -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 ) )