Test case for Bug 50 [Was: Bug 50]

Pedro Araujo Chaves Jr. inckie at gmail.com
Fri Jan 12 07:53:10 CST 2007


Update...

I thought I had managed to get Keith's idea and make up a patch, but,
to great grief -- and not so great a surprise --, I have just
discovered that my patch for bug 50 is not as effective on Lotus Notes
6.5.3 as it was in Notes R5 and the Petzold justify1 example.

Well, I'm checking some traces here, and noticed that version 6.5.3
uses a rather odd -- at least to me -- method for justifying a
paragraph... below is a section of the trace grepped to show only the
relevant calls. Here Notes is trying to justify the first paragraph of
a message, being the first line

> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam tellus pede, semper id, convallis a, tincidunt ut, augue.

That's a single line -- or rather extent --, but here is what the log
says (ignore the excess of repetitions, I was trying to be thorough):

---- LOG SECTION STARTS HERE ----
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=7, breakCount=7)
trace:font:GetTextExtentPoint32W (0xaa60 L"Lorem ipsum dolor sit amet,
consectetuer adipiscing elit" 56 0x34c1c4): returning 3457528 x 0
trace:font:GetTextExtentExPointW (0xaa60, L"Lorem ipsum dolor sit
amet, consectetuer adipiscing elit", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L"Lorem ipsum dolor
sit amet, consectetuer adipiscing elit", 56, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=333, cy=19, nfit=56
trace:font:GetTextExtentExPointW returning cx=333, cy=19, nFit=0
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=0, breakCount=0)
trace:font:GetTextExtentPoint32W (0xaa60 L"." 1 0x34c1c4): returning 3457528 x 0
trace:font:GetTextExtentExPointW (0xaa60, L".", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L".", 1, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=4, cy=19, nfit=1
trace:font:GetTextExtentExPointW returning cx=4, cy=19, nFit=0
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=1, breakCount=1)
trace:font:GetTextExtentPoint32W (0xaa60 L" " 1 0x34c1c4): returning 3457528 x 0
trace:font:GetTextExtentExPointW (0xaa60, L" ", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L" ", 1, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=4, cy=19, nfit=1
trace:font:GetTextExtentExPointW returning cx=4, cy=19, nFit=0
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=0, breakCount=0)
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=13, breakCount=9)
trace:font:GetTextExtentPoint32W (0xaa60 L"Etiam tellus pede, semper
id, convallis a, tincidunt ut, augue" 62 0x34c1c4): returning 3457528
x 0
trace:font:GetTextExtentExPointW (0xaa60, L"Etiam tellus pede, semper
id, convallis a, tincidunt ut, augue", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L"Etiam tellus pede,
semper id, convallis a, tincidunt ut, augue", 62, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=355, cy=19, nfit=62
trace:font:GetTextExtentExPointW returning cx=355, cy=19, nFit=0
trace:font:SetTextJustification (hdc=0xaa60, breakExtra=0, breakCount=0)
trace:font:GetTextExtentPoint32W (0xaa60 L"." 1 0x34c1c4): returning 3457528 x 0
trace:font:GetTextExtentExPointW (0xaa60, L".", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L".", 1, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=4, cy=19, nfit=1
trace:font:GetTextExtentExPointW returning cx=4, cy=19, nFit=0
trace:font:GetTextExtentPoint32W (0xaa60 L" " 1 0x34c1c4): returning 3457528 x 0
trace:font:GetTextExtentExPointW (0xaa60, L" ", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457528, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L" ", 1, 0, 0x34c1c4
trace:font:WineEngGetTextExtentExPoint return cx=4, cy=19, nfit=1
trace:font:GetTextExtentExPointW returning cx=4, cy=19, nFit=0
trace:font:GetTextExtentPoint32W (0xaa60 L" " 1 0x34c184): returning 3457464 x 0
trace:font:GetTextExtentExPointW (0xaa60, L" ", 0)
trace:font:GetTextExtentExPointW hdc=0xaa60, cx=3457464, cy=0
trace:font:WineEngGetTextExtentExPoint 0x2de6e90, L" ", 1, 0, 0x34c184
trace:font:WineEngGetTextExtentExPoint return cx=4, cy=19, nfit=1
trace:font:GetTextExtentExPointW returning cx=4, cy=19, nFit=0
---- LOG SECTION ENDS HERE ----

Btw, that last period was *not* painted.

I'm having some ideas here, but they don't seem very nice right now...
what about you? Keith?

TIA,
- Pedro.



More information about the wine-devel mailing list