https://bugs.winehq.org/show_bug.cgi?id=45400
Bug ID: 45400 Summary: eden* (VN) some font characters display with the wrong glyph (capitals/spaces) Product: Wine Version: 3.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kq3thih@mailnesia.com Distribution: ---
Created attachment 61710 --> https://bugs.winehq.org/attachment.cgi?id=61710 +font,+nls,+relay - 36.4M
eden*, GOG version (all ages/17+), some font characters display with the wrong glyph. Often capital letters and/or spaces. To reproduce start eden_en.exe, and click Settings or start a new game.
Merriweather MG font is installed along with the game. When chosen as the font to use the broken characters display as the first non-unicode glyph in Merriweather MG, box with an X inside named ".notdef" according to FontForge.
From the attached +font,+nls,+relay log.
A wrong glyph: --- snip --- 002b:Call KERNEL32.MultiByteToWideChar(000004e4,00000001,0033f644 "l",00000001,0033f640,00000001) ret=0051a005 002b:trace:nls:MultiByteToWideChar cp 1252 "l" -> L"l", ret = 1 002b:Ret KERNEL32.MultiByteToWideChar() retval=00000001 ret=0051a005 002b:Call gdi32.GetGlyphOutlineW(0037005b,0037006c,00000005,00d0e770,00000000,009a2ad8,005671d0) ret=0051a053 002b:trace:font:GetGlyphOutlineW (0x37005b, 37006c, 0005, 0xd0e770, 0, 0x9a2ad8, 0x5671d0) 002b:trace:font:get_glyph_outline 0x1c2570, 37006c, 00000005, 0xd0e770, 00000000, 0x9a2ad8, 0x5671d0 002b:trace:font:get_glyph_outline font transform 1.000000 0.000000 0.000000 1.000000 002b:trace:font:get_glyph_outline 10,11,(0,12),10,0 002b:Ret gdi32.GetGlyphOutlineW() retval=00000084 ret=0051a053 002b:Call gdi32.GetGlyphOutlineW(0037005b,0037006c,00000005,00d0e770,00000084,009a2ad8,005671d0) ret=0051a161 002b:trace:font:GetGlyphOutlineW (0x37005b, 37006c, 0005, 0xd0e770, 132, 0x9a2ad8, 0x5671d0) 002b:trace:font:get_glyph_outline 0x1c2570, 37006c, 00000005, 0xd0e770, 00000084, 0x9a2ad8, 0x5671d0 002b:trace:font:get_glyph_outline font transform 1.000000 0.000000 0.000000 1.000000 002b:trace:font:get_glyph_outline 10,11,(0,12),10,0 002b:Ret gdi32.GetGlyphOutlineW() retval=00000084 ret=0051a161 --- snip ---
A correct glyph: --- snip --- 002b:Call KERNEL32.MultiByteToWideChar(000004e4,00000001,0033f644 "a",00000001,0033f640,00000001) ret=0051a005 002b:trace:nls:MultiByteToWideChar cp 1252 "a" -> L"a", ret = 1 002b:Ret KERNEL32.MultiByteToWideChar() retval=00000001 ret=0051a005 002b:Call gdi32.GetGlyphOutlineW(0037005b,00000061,00000005,00d0e770,00000000,009a2ad8,005671d0) ret=0051a053 002b:trace:font:GetGlyphOutlineW (0x37005b, 0061, 0005, 0xd0e770, 0, 0x9a2ad8, 0x5671d0) 002b:trace:font:get_glyph_outline 0x1c2570, 0061, 00000005, 0xd0e770, 00000000, 0x9a2ad8, 0x5671d0 002b:trace:font:get_glyph_outline font transform 1.000000 0.000000 0.000000 1.000000 002b:trace:font:get_glyph_outline 9,12,(0,11),8,0 002b:Ret gdi32.GetGlyphOutlineW() retval=00000090 ret=0051a053 002b:Call gdi32.GetGlyphOutlineW(0037005b,00000061,00000005,00d0e770,00000090,009a2ad8,005671d0) ret=0051a161 002b:trace:font:GetGlyphOutlineW (0x37005b, 0061, 0005, 0xd0e770, 144, 0x9a2ad8, 0x5671d0) 002b:trace:font:get_glyph_outline 0x1c2570, 0061, 00000005, 0xd0e770, 00000090, 0x9a2ad8, 0x5671d0 002b:trace:font:get_glyph_outline font transform 1.000000 0.000000 0.000000 1.000000 002b:trace:font:get_glyph_outline 9,12,(0,11),8,0 002b:Ret gdi32.GetGlyphOutlineW() retval=00000090 ret=0051a161 --- snip ---
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #1 from Aexander kq3thih@mailnesia.com --- Created attachment 61711 --> https://bugs.winehq.org/attachment.cgi?id=61711 Settings
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #2 from Aexander kq3thih@mailnesia.com --- Created attachment 61712 --> https://bugs.winehq.org/attachment.cgi?id=61712 in game screenshot
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #3 from Aexander kq3thih@mailnesia.com --- Created attachment 61713 --> https://bugs.winehq.org/attachment.cgi?id=61713 hack
Attached hack discards the high order bytes of uChar in GetGlyphOutlineW() which seems to allow the game to display correctly.
Might be useful for someone competent to look at it in a debugger to see if the program is misbehaving or Wine is doing something wrong. Believe it works normally in Windows though.
https://bugs.winehq.org/show_bug.cgi?id=45400
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=45400
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |gdi32
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 66527 --> https://bugs.winehq.org/attachment.cgi?id=66527 test
Hi,
Thanks for the report. It looks like a valid issue, attaching a simple test here. I suspect this function is not meant to work for chars above 0xffff, which is common for GDI font API. One way to verify that is to create a font with 2 glyphs: .notdef and one for 0x10000 with distinct metrics, and see what GetGlyphOutlineW() returns. It's possible game is using single UINT as WCHAR buffer destination for mbtowc conversion, and that leaves higher word untouched.
Could be a good small task for someone starting to explore this section of Wine code.
P.S. could someone verify if bug occurs for current wine 5.x builds and Steam version of the game?
https://bugs.winehq.org/show_bug.cgi?id=45400
maniikarabera@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #5 from Aexander kq3thih@mailnesia.com --- (In reply to Nikolay Sivov from comment #4)
P.S. could someone verify if bug occurs for current wine 5.x builds
Still occurs with 5.3 and the GOG version.
https://bugs.winehq.org/show_bug.cgi?id=45400
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=45400
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- This should be fixed now with https://source.winehq.org/git/wine.git/commit/45aee6375d0f2dcfe7bd47b5d0e486.... Please retest.
https://bugs.winehq.org/show_bug.cgi?id=45400
Aexander kq3thih@mailnesia.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64 Resolution|--- |FIXED Distribution|--- |Debian Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |45aee6375d0f2dcfe7bd47b5d0e | |4866916a345db
--- Comment #7 from Aexander kq3thih@mailnesia.com --- Yes, fixed by commit https://source.winehq.org/git/wine.git/commit/45aee6375d0f2dcfe7bd47b5d0e4866916a345db ("gdi32: Limit GetGlyphOutlineW(uChar) to a WORD."). Thanks Arkadiusz.
https://bugs.winehq.org/show_bug.cgi?id=45400
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.19.
https://bugs.winehq.org/show_bug.cgi?id=45400
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=45400
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #9 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.4.