Just adds a useful error message when we have to rebuild the cached metrics. It attempts to print out the name of teh last successfully read font. --- /devel/corelwineVirgin/corelwine/graphics/x11drv/xfont.c Mon May 15 10:48:04 2000 +++ xfont.c Tue May 16 16:43:23 2000 @@ -2458,6 +2458,8 @@ */ static BOOL XFONT_ReadCachedMetrics( int fd, int res, unsigned x_checksum, int x_count ) { + fontInfo* previous = NULL; + if( fd >= 0 ) { unsigned u; @@ -2489,6 +2491,7 @@ read( fd, fontList, i); /* read all metrics at once */ while( offset < length ) { + previous = pfi; offset += sizeof(fontResource) + sizeof(fontInfo); pfr->fi = pfi = (fontInfo*)(pfr + 1); j = 1; @@ -2545,8 +2548,14 @@ } } fail: + printf("Reading font metrics failed. Rebuilding.\n"); + printf("This usually means a bad font was found.\n"); + + if(previous != NULL) + printf("Last font successfully read: %s\n", previous->df.dfFace); + if( fontList ) HeapFree( SystemHeap, 0, fontList ); - fontList = NULL; + fontList = NULL; close( fd ); } return FALSE;