http://bugs.winehq.org/show_bug.cgi?id=22109
Summary: BiuTicker: Text in list displayed too deep and clipped away Product: Wine Version: 1.1.39 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 AssignedTo: wine-bugs@winehq.org ReportedBy: wolfgang.schwotzer@gmx.net
Created an attachment (id=26951) --> (http://bugs.winehq.org/attachment.cgi?id=26951) BiuTicker list display (text drawn too deep)
When starting BiuTicker a list of stock chart properties is displayed. In this list the text is displayed too deep. Only the top most scan line of each character is visible, the rest is clipped away. See attachments.
My current error analysis:
Within DrawTextExW: y-coordinates are negative viewport coordinates are positive. DT_NOCLIP is 0 (clipping active) DT_SINGLELINE is 1 DT_VCENTER is 1 (Center text vertically)
According to these flags the y coordinate (of the bottom line) is calculated. When calling ExtTextOutW the text alignment within the used DC is TA_TOP which results in using the y coordinate as top line (instead of bottom line).
Forcing alignment to TA_BOTTOM before calling ExtTextOutW would display the text right but has side effects on other DrawTextExW calls.
http://bugs.winehq.org/show_bug.cgi?id=22109
wolfgang.schwotzer@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.1.39 |1.1.41
--- Comment #1 from wolfgang.schwotzer@gmx.net 2010-03-21 12:16:27 --- BiuTicker can be downloaded from:
http://www.biu.de/support/setup_biuticker.msi
Before installation execute: winetricks jet40 mdac28
Bug still exists with wine-1.1.41
http://bugs.winehq.org/show_bug.cgi?id=22109
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.biu.de/support/s | |etup_biuticker.msi Component|gdi32 |-unknown Severity|normal |minor
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2010-03-21 13:36:27 --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
http://bugs.winehq.org/show_bug.cgi?id=22109
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.1.41 |1.1.39
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-22 04:04:48 --- Please leave the version field alone.
http://bugs.winehq.org/show_bug.cgi?id=22109
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #4 from Wylda wylda@volny.cz 2010-04-22 01:23:52 ---
Confirming, happens in all the following versions: * 0.9.49, 1.0.1, 1.1.22, 1.1.43
http://bugs.winehq.org/show_bug.cgi?id=22109
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #5 from Austin English austinenglish@gmail.com 2010-04-22 02:07:49 --- Confirming.
http://bugs.winehq.org/show_bug.cgi?id=22109
Konstantin Kondratyuk kondratyuk@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kondratyuk@etersoft.ru
--- Comment #6 from Konstantin Kondratyuk kondratyuk@etersoft.ru 2010-05-17 06:24:45 --- I have this problem with a printer's context.
In function DrawTextExW for DT_SINGLELINE | DT_VCENTER is: y = rect->top + (rect.bottom - rect-top) / 2 - size.cy / 2
For displays all works correctly. But for printer's DC: rect.top < 0 rect.bottom < 0 size.cy > 0 (is wrong?)
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #7 from Konstantin Kondratyuk kondratyuk@etersoft.ru 2010-05-17 06:31:14 --- As workaround:
int sign = rect.top / abs(rect.top); y = rect->top + (rect.bottom - rect.top) / 2 - sign * size.cy / 2;
It's bad hack, DrawTextExW in metafile is not correct.
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #8 from Wylda wylda@volny.cz 2010-05-17 07:08:04 --- (In reply to comment #7)
As workaround:
int sign = rect.top / abs(rect.top); y = rect->top + (rect.bottom - rect.top) / 2 - sign * size.cy / 2;
It's bad hack, DrawTextExW in metafile is not correct.
When this is in BiuTicker thread, i try to replace that code in dlls/user32/text.c and got :-/
wine: Unhandled division by zero at address 0x7eda99bc (thread 0009), starting debugger...
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #9 from Konstantin Kondratyuk kondratyuk@etersoft.ru 2010-05-17 07:15:26 --- (In reply to comment #8)
When this is in BiuTicker thread, i try to replace that code in dlls/user32/text.c and got :-/
wine: Unhandled division by zero at address 0x7eda99bc (thread 0009), starting debugger...
Oops! :( My mistake, it's bad example. I use follow code now:
int sign = 1; if(rect.top < 0 && rect.bottom < 0) sign = -1; ...
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #10 from wolfgang.schwotzer@gmx.net 2010-05-17 15:00:41 --- (In reply to comment #9) Described workaround results in correct text display in BiuTicker. Possible side effects have to be checked.
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #11 from Wylda wylda@volny.cz 2010-05-17 16:54:04 --- Created an attachment (id=28049) --> (http://bugs.winehq.org/attachment.cgi?id=28049) BiuTicker finally works
Hi Konstantin, your patch works perfectly here. Can someone add keyword patch?
...Possible side effects have to be checked.
That's what are wine tests used for, isn't it? Anyway i wouldn't be afraid. Even if that won't be covered by some existing test, possible problems will be shortly discovered by regression tests.
http://bugs.winehq.org/show_bug.cgi?id=22109
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #12 from Vitaliy Margolen vitaliy@kievinfo.com 2010-05-18 08:20:28 --- A real patch in unified diff format is better of course.
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #13 from Wylda wylda@volny.cz 2010-06-01 11:25:29 --- Created an attachment (id=28495) --> (http://bugs.winehq.org/attachment.cgi?id=28495) patch
(In reply to comment #12)
A real patch in unified diff format is better of course.
Hi, ok i tried that. This is the patch written by Konstantin Kondratyuk which fixes BiuTicker misplaced text (see comment #11).
Patch applies cleanly to wine-1.2-rc2-51-gbbd93e5. Could anyone pick that and send to wine-patches?
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #14 from Austin English austinenglish@gmail.com 2010-06-01 11:38:22 --- (In reply to comment #13)
Created an attachment (id=28495)
--> (http://bugs.winehq.org/attachment.cgi?id=28495) [details]
patch
(In reply to comment #12)
A real patch in unified diff format is better of course.
Hi, ok i tried that. This is the patch written by Konstantin Kondratyuk which fixes BiuTicker misplaced text (see comment #11).
Patch applies cleanly to wine-1.2-rc2-51-gbbd93e5. Could anyone pick that and send to wine-patches?
You can send it yourself, be sure to give Konstantin credit.
Keep in mind though that wine is in code freeze at the moment, and the patch needs a testcase.
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #15 from Wylda wylda@volny.cz 2010-08-28 21:45:34 CDT ---
The patch in comment #13 still works in wine-1.3.1-267-g7ab48e8. I'm not allow to send patches so any volunteer for picking this up and sending to wine-patches?
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #16 from wolfgang.schwotzer@gmx.net 2010-09-07 12:38:32 CDT --- Patch sent.
http://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #17 from wolfgang.schwotzer@gmx.net 2010-09-08 16:38:55 CDT --- Patch was rejected by Alexandre Julliard. Reason: "This doesn't make sense, the sign should depend on the viewport mappings, not on the position being negative."
Who can help?
http://bugs.winehq.org/show_bug.cgi?id=22109
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #18 from Bruno Jesus 00cpxxx@gmail.com --- Still in wine 1.7.30.
https://bugs.winehq.org/show_bug.cgi?id=22109
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #19 from Sebastian Lackner sebastian@fds-team.de --- This is what a proper solution should look like at my opinion:
https://github.com/wine-compholio/wine-staging/blob/master/patches/user32-Dr...
I've tested with the app in this bug report and it fixes the issue for me. I'll try to write some tests for that, in the meantime feel free to test this patch ;)
https://bugs.winehq.org/show_bug.cgi?id=22109
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32
--- Comment #20 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Sebastian Lackner from comment #19)
I've tested with the app in this bug report and it fixes the issue for me. I'll try to write some tests for that, in the meantime feel free to test this patch ;)
The patch works fine.
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #21 from wolfgang.schwotzer@gmx.net --- Tested with wine-1.7.31 + patch from Sebastian Lackner with BiuTicker V2.5.2. The patch works great and solves this issue.
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #22 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- *** Bug 30104 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=22109
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-DrawTex | |tExW
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #23 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- (In reply to Sebastian Lackner from comment #19)
This is what a proper solution should look like at my opinion:
https://github.com/wine-compholio/wine-staging/blob/master/patches/user32- DrawTextExW/0001-user32-Fix-handling-of-invert_y-in-DrawTextExW.patch
I've tested with the app in this bug report and it fixes the issue for me. I'll try to write some tests for that, in the meantime feel free to test this patch ;)
Any chance your going to up-streamed this patch?
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #24 from Wylda wylda@volny.cz ---
Still present in wine-1.9.3.
https://bugs.winehq.org/show_bug.cgi?id=22109
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.malaterre@gmail.com
--- Comment #25 from Sebastian Lackner sebastian@fds-team.de --- *** Bug 31040 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=22109
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #26 from joaopa jeremielapuree@yahoo.fr --- Still a bug in current wine?
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #27 from Wylda wylda@volny.cz ---
Still a bug in current wine?
Bug still present in wine-3.4. Works correctly in wine-2.19-staging.
https://bugs.winehq.org/show_bug.cgi?id=22109
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/user32-DrawTex |er/patches/user32-DrawTextE |tExW |xW CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=22109
--- Comment #28 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-4.9?