https://bugs.winehq.org/show_bug.cgi?id=56165
Bug ID: 56165 Summary: GetTextExtentPoint32W returns incorrect sizes Product: Wine Version: 8.0 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: creatorcray@gmail.com
Created attachment 75870 --> https://bugs.winehq.org/attachment.cgi?id=75870 Source for the test that demonstrates the issue
Starting with Wine7 the GetTextExtentPoint32W is telling porkies for non-antialiased fonts in quite a range of various heights and weights. Somehow if string has more uppercase letters it makes it more prone to has its size miscalculated
See attached source/binary/screenshots
The demo binary has 2 modes: showing the end of the text as calculated by GetTextExtentPoint32W and checkerboard pattern highlighting of the text, switchable by pressing a spacebar
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #1 from creatorcray@gmail.com --- Created attachment 75871 --> https://bugs.winehq.org/attachment.cgi?id=75871 x86-64 binary, compiled from the attached source
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #2 from creatorcray@gmail.com --- Created attachment 75872 --> https://bugs.winehq.org/attachment.cgi?id=75872 A screenshot from Wine6, where everything is working correctly
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #3 from creatorcray@gmail.com --- Created attachment 75873 --> https://bugs.winehq.org/attachment.cgi?id=75873 A screenshot from Wine8, where the bug is present
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #4 from creatorcray@gmail.com --- The reverse lookup function (GetTextExtentExPoint) is also affected.
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #5 from Rafał Mużyło galtgendo@o2.pl --- Given that one of the fonts you're using in test is bold variant of Arial, could my bug 44963 is strongly related ?
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #6 from creatorcray@gmail.com --- The problem is in the libcxfreetype.6.dylib the newer versions of Crossover are using. After I replaced it with older file from Crossover 21.2 the issue is not reproducible anymore.
https://bugs.winehq.org/show_bug.cgi?id=56165
--- Comment #7 from creatorcray@gmail.com --- (In reply to Rafał Mużyło from comment #5)
Given that one of the fonts you're using in test is bold variant of Arial, could my bug 44963 is strongly related ?
In my case both FW_BOLD and FW_NORMAL variants were affected. Also I traced down the issue to the freetype library calls, and it turned out that Crossover switched from good version of FreeType 2.6.2 to a clearly buggy version 2.12.1, from what I see inside the dylib files.