http://bugs.winehq.org/show_bug.cgi?id=58314
Bug ID: 58314 Summary: GetGlyphOutlineW returns a negative number sometimes Product: Wine Version: 10.8 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: skyfloogle@protonmail.com Distribution: ---
Created attachment 78672 --> http://bugs.winehq.org/attachment.cgi?id=78672 Source code for a repro, an exe build, Windows and Wine sample logs, and the necessary font.
In an application I'm developing, I've found that GetGlyphOutlineW returns a negative number under specific circumstances in Wine. According to the documentation, it should return a positive number, with the exception of GDI_ERROR (-1). My program therefore treats the return value as unsigned (as specified in the documentation) and checks against -1, which doesn't work when it returns -32 instead. It's not clear to me why this value is being returned, but I've only seen it reproduce with a specific character (¯) in a specific font.
I've put together a minimal reproducing sample. The issue reproduces on both 32 and 64 bit, and does not reproduce on Windows. Source code and a copy of the necessary font (https://ggbot.itch.io/raster-forge-font) are attached, as are expected and actual logs. In this sample, -8 is returned instead of -32, but I suspect the root cause is similar - it shouldn't be returning anything lower than -1 in either case.
For what it's worth, I'm running on EndeavourOS, which hasn't received 10.9 yet at the time of writing, but I've checked the commit logs for gdi32 and haven't seen anything that looks relevant.