Index: tools/convbdf.c =================================================================== --- tools/convbdf.c (Revision 20098) +++ tools/convbdf.c (Arbeitskopie) @@ -522,6 +522,17 @@ if (encoding < 0) continue; + + if (bby < -pf->descent) { + fprintf(stderr, "Error: character %d goes %d pixel(s) beyond the font's descent\n", + encoding, -bby-pf->descent); + return 0; + } + if (bby + bbh > pf->ascent) { + fprintf(stderr, "Error: character %d goes %d pixel(s) beyond the font's ascent\n", + encoding, bby + bbh - pf->ascent); + return 0; + } /* set bits offset in encode map*/ if (pf->offset[encoding-pf->firstchar] != (unsigned int)-1) {