Help debugging problem with AbiWord 0.9 under Wine


Subject: Help debugging problem with AbiWord 0.9 under Wine
From: Dan Kegel (dank@kegel.com)
Date: Tue Aug 07 2001 - 12:39:33 CDT


I'm using AbiWord 0.9 for win32 under Wine on Linux
as a way to test wine. And, um, there are a couple problems,
probably in Wine. I'm looking for a little help in tracking
down how AbiWord uses Win32 calls to decide what the proper
line spacing is. In particular, does it use GetTextMetrics
to figure out the height of the font? I see plenty of calls
to that, but maybe only for menu text, not for document text.

I have the abiword source tree, but cross-compiling it for windows
under linux is probably more than I want to tackle, so
I'm stuck inspecting source, and it's a little hard to grok.

The bug I'm going after is: Abiword 0.9 win32 displays the lines
of a document overlapping vertically; the Y step is only 2 pixels instead
of the expected 12 or 15 or so.

The input file foo3.txt is:

line 1WWWWWWWW
line 2
line 3
line 4
line 5--

Wine has a nice feature that lets you trace the win32 calls an app makes.
When I use this like so:

wine -debugmsg trace+font,+text,+relay=gdi32:x11drv "c:\\Program Files\\AbiSuite\\AbiWord\\bin\\AbiWord.exe" ~/foo3.txt |
egrep 'Height|line ' | uniq

I see

    Height = 12
    Height = 20
    Height = 34
    Height = 12
    Height = 14
    Height = 12
08068c80:Call gdi32.ExtTextOutW(00000f44,00000079,00000078,00000000,00000000,40472e90 L"line 1WWWWWWWW\2e84\40474",0000000e,00000000) ret=0048e02b
trace:text:X11DRV_ExtTextOut hdc=0f44 df=0004 121,120 L"line 1WWWWWWWW"..., 14 flags=0 lpDx=(nil)
trace:text:X11DRV_GetTextExtentPoint L"line 1WWWWWWWW"... 14
08068c80:Call gdi32.ExtTextOutW(00000f44,00000079,0000007a,00000000,00000000,40472e90 L"line 2WWWWWWWW\2e84\40474",00000006,00000000) ret=0048e02b
trace:text:X11DRV_ExtTextOut hdc=0f44 df=0004 121,122 L"line 2"..., 6 flags=0 lpDx=(nil)
trace:text:X11DRV_GetTextExtentPoint L"line 2"... 6
08068c80:Call gdi32.ExtTextOutW(00000f44,00000079,0000007d,00000000,00000000,40472e90 L"line 3WWWWWWWW\2e84\40474",00000006,00000000) ret=0048e02b
trace:text:X11DRV_ExtTextOut hdc=0f44 df=0004 121,125 L"line 3"..., 6 flags=0 lpDx=(nil)
trace:text:X11DRV_GetTextExtentPoint L"line 3"... 6
08068c80:Call gdi32.ExtTextOutW(00000f44,00000079,0000007f,00000000,00000000,40472e90 L"line 4WWWWWWWW\2e84\40474",00000006,00000000) ret=0048e02b
trace:text:X11DRV_ExtTextOut hdc=0f44 df=0004 121,127 L"line 4"..., 6 flags=0 lpDx=(nil)
trace:text:X11DRV_GetTextExtentPoint L"line 4"... 6
08068c80:Call gdi32.ExtTextOutW(00000f44,00000079,00000081,00000000,00000000,40472e90 L"line 5--WWWWWW\2e84\40474",00000008,00000000) ret=0048e02b
trace:text:X11DRV_ExtTextOut hdc=0f44 df=0004 121,129 L"line 5--"..., 8 flags=0 lpDx=(nil)
trace:text:X11DRV_GetTextExtentPoint L"line 5--"... 8
    Height = 12
[snip]

You can clearly see in the calls to ExtTextOutW that each
line is displayed just two pixels lower than the previous line.

Any debugging suggestions?
- Dan

-- 
"I have seen the future, and it licks itself clean." -- Bucky Katt



This archive was generated by hypermail 2b25 : Tue Aug 07 2001 - 12:32:02 CDT