Add font traces
François Gouget
fgouget at codeweavers.com
Wed Oct 31 23:55:52 CST 2001
Changelog:
François Gouget <fgouget at codeweavers.com>
* graphics/x11drv/xfont.c,
objects/font.c
Add traces to help diagnose systematic cached-metrics regeneration
problems
Enhance a trace to allow better font matching diagnosis
--
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: graphics/x11drv/xfont.c
===================================================================
RCS file: /home/wine/wine/graphics/x11drv/xfont.c,v
retrieving revision 1.87
diff -u -r1.87 xfont.c
--- graphics/x11drv/xfont.c 2001/10/23 19:54:27 1.87
+++ graphics/x11drv/xfont.c 2001/10/31 19:08:40
@@ -2185,9 +2185,17 @@
{
if( offset > length ||
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;
if( pfi->fi_flags & FI_SCALABLE )
@@ -2225,13 +2233,21 @@
lpch += len;
offset += len;
if (offset > length)
+ {
+ TRACE("error: offset=%ld length=%ld\n",(long)offset,(long)length);
goto fail;
+ }
}
close( fd );
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:
if( fontList ) HeapFree( GetProcessHeap(), 0, fontList );
Index: objects/font.c
===================================================================
RCS file: /home/wine/wine/objects/font.c,v
retrieving revision 1.56
diff -u -r1.56 font.c
--- objects/font.c 2001/10/23 20:06:33 1.56
+++ objects/font.c 2001/10/31 19:08:44
@@ -453,9 +453,10 @@
{
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->lfEscapement, plf->lfOrientation,
+ plf->lfPitchAndFamily,
debugstr_w(plf->lfFaceName),
plf->lfWeight > 400 ? "Bold" : "",
plf->lfItalic ? "Italic" : "", hFont);
More information about the wine-patches
mailing list