[Bug 54962] New: GDI+ text rendering does not handle carriage returns
https://bugs.winehq.org/show_bug.cgi?id=54962 Bug ID: 54962 Summary: GDI+ text rendering does not handle carriage returns Product: Wine Version: 8.8 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: gdiplus Assignee: wine-bugs(a)winehq.org Reporter: klightspeed(a)netspace.net.au Distribution: --- Created attachment 74489 --> https://bugs.winehq.org/attachment.cgi?id=74489 C++ program reproducing issue gdip_format_string does not currently handle CR-LF sequences in text to be drawn. This results in boxes being rendered on the end of each line rendered by e.g. Graphics::DrawString when the string contains CR-LF (\r\n) newlines. Comparing to the behaviour on Windows, it appears that Windows renders carriage returns as zero-width characters. Comparing the values filled into the lpnDx parameter to GetTextExtentExPointW, Windows gives the characters '\r', '\n', and '\t' a width of 0, while wine gives them the same width as any other unknown character. Windows: Character offsets: "H" (12) "e" (21) "l" (24) "l" (27) "o" (36) "\u000d" (36) "\u000a" (36) "W" (51) "o" (60) "r" (65) "l" (68) "d" (77) wine: Character offsets: "H" (12) "e" (21) "l" (25) "l" (29) "o" (38) "\u000d" (43) "\u000a" (48) "W" (63) "o" (72) "r" (77) "l" (81) "d" (90) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 --- Comment #1 from Ben Peddell <klightspeed(a)netspace.net.au> --- Created attachment 74490 --> https://bugs.winehq.org/attachment.cgi?id=74490 Output on Windows 10 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 --- Comment #2 from Ben Peddell <klightspeed(a)netspace.net.au> --- Created attachment 74491 --> https://bugs.winehq.org/attachment.cgi?id=74491 Output under wine 8.8 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 David Kahurani <k.kahurani(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |k.kahurani(a)gmail.com --- Comment #3 from David Kahurani <k.kahurani(a)gmail.com> --- I have submitted a possible fix to this issue: https://gitlab.winehq.org/wine/wine/-/merge_requests/2865 I have tested with your test project/program and it seems to resolve the issue you were having. This issue can be solved without concerning ourselves with the issue in GetTextExtentExPointW but, of course, that should be a different bug. In fact, this second bug will affect the functioning of gdip_format_string so that it tries to write strings containing only whitespace characters. Thanks for the report. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 Bartosz <gang65(a)poczta.onet.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gang65(a)poczta.onet.pl, | |madewokherd(a)gmail.com --- Comment #4 from Bartosz <gang65(a)poczta.onet.pl> --- Th -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 --- Comment #5 from Bartosz <gang65(a)poczta.onet.pl> --- The issue is already resolved. Confirmed with Wine 8.20. It could be closed as fixed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 Esme Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #6 from Esme Povirk <madewokherd(a)gmail.com> --- Reported fixed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54962 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #7 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 8.21. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla