Add traces to help diagnose systematic cached-metrics regeneration
problems.
This commit is contained in:
parent
996028be15
commit
74c2cbeecf
|
@ -2185,9 +2185,17 @@ static BOOL XFONT_ReadCachedMetrics( int fd, int res, unsigned x_checksum, int x
|
||||||
{
|
{
|
||||||
if( offset > length ||
|
if( offset > length ||
|
||||||
pfi->cptable >= (UINT16)X11DRV_CPTABLE_COUNT ||
|
pfi->cptable >= (UINT16)X11DRV_CPTABLE_COUNT ||
|
||||||
(int)(pfi->next) != j++ ) goto fail;
|
(int)(pfi->next) != j++ )
|
||||||
|
{
|
||||||
|
TRACE("error: offset=%ld length=%ld cptable=%d pfi->next=%d j=%d\n",(long)offset,(long)length,pfi->cptable,(int)pfi->next,j-1);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if( pfi->df.dfPixHeight == 0 ) goto fail;
|
if( pfi->df.dfPixHeight == 0 )
|
||||||
|
{
|
||||||
|
TRACE("error: dfPixHeight==0\n");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
pfi->df.dfFace = pfr->lfFaceName;
|
pfi->df.dfFace = pfr->lfFaceName;
|
||||||
if( pfi->fi_flags & FI_SCALABLE )
|
if( pfi->fi_flags & FI_SCALABLE )
|
||||||
|
@ -2225,13 +2233,21 @@ static BOOL XFONT_ReadCachedMetrics( int fd, int res, unsigned x_checksum, int x
|
||||||
lpch += len;
|
lpch += len;
|
||||||
offset += len;
|
offset += len;
|
||||||
if (offset > length)
|
if (offset > length)
|
||||||
|
{
|
||||||
|
TRACE("error: offset=%ld length=%ld\n",(long)offset,(long)length);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close( fd );
|
close( fd );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
TRACE("Wrong length: %ld!=%ld\n",(long)length,(long)(i+offset));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
TRACE("Checksum (%x vs. %x) or count (%d vs. %d) mismatch\n",
|
||||||
|
u,x_checksum,i,x_count);
|
||||||
}
|
}
|
||||||
fail:
|
fail:
|
||||||
if( fontList ) HeapFree( GetProcessHeap(), 0, fontList );
|
if( fontList ) HeapFree( GetProcessHeap(), 0, fontList );
|
||||||
|
|
|
@ -453,9 +453,10 @@ HFONT WINAPI CreateFontIndirectW( const LOGFONTW *plf )
|
||||||
{
|
{
|
||||||
memcpy( &fontPtr->logfont, plf, sizeof(LOGFONTW) );
|
memcpy( &fontPtr->logfont, plf, sizeof(LOGFONTW) );
|
||||||
|
|
||||||
TRACE("(%ld %ld %ld %ld) %s %s %s => %04x\n",
|
TRACE("(%ld %ld %ld %ld %x) %s %s %s => %04x\n",
|
||||||
plf->lfHeight, plf->lfWidth,
|
plf->lfHeight, plf->lfWidth,
|
||||||
plf->lfEscapement, plf->lfOrientation,
|
plf->lfEscapement, plf->lfOrientation,
|
||||||
|
plf->lfPitchAndFamily,
|
||||||
debugstr_w(plf->lfFaceName),
|
debugstr_w(plf->lfFaceName),
|
||||||
plf->lfWeight > 400 ? "Bold" : "",
|
plf->lfWeight > 400 ? "Bold" : "",
|
||||||
plf->lfItalic ? "Italic" : "", hFont);
|
plf->lfItalic ? "Italic" : "", hFont);
|
||||||
|
|
Loading…
Reference in New Issue