https://bugs.winehq.org/show_bug.cgi?id=52898
Bug ID: 52898 Summary: gdi32:font - test_max_height() fails on all Windows 10 versions Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
test_max_height() fails on all Windows 10 versions:
font.c:6532: Test failed: height=-65536: GetTextMetrics failed font.c:6533: Test failed: height=-65536: expected 1 ppem value (2), got 0 font.c:6535: Test failed: height=-65536: expected 1 ppem value (1), got 0 font.c:6532: Test failed: height=-123456: GetTextMetrics failed font.c:6533: Test failed: height=-123456: expected 1 ppem value (2), got 0 font.c:6535: Test failed: height=-123456: expected 1 ppem value (1), got 0 font.c:6532: Test failed: height=123456: GetTextMetrics failed font.c:6533: Test failed: height=123456: expected 1 ppem value (2), got 0 font.c:6535: Test failed: height=123456: expected 1 ppem value (1), got 0
https://test.winehq.org/data/patterns.html#gdi32:font
Furthermore, the following related tests also fail on Windows 10 1809+:
font.c:6517: Test failed: GetTextMetrics failed font.c:6518: Test failed: expected greater than 1 ppem value (2), got 0 font.c:6520: Test failed: expected greater than 1 ppem value (1), got 0
https://bugs.winehq.org/show_bug.cgi?id=52898
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=52898
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Windows 10 seems to introduce a new upper bound rule for the font height. I'm not sure how the value is derived.
When lfWidth=0, valid lfHeight ranges are: Tahoma: from -17,035 to 20,561, MS PGothic: from -20,864 to 20,864, Arial: from -16,985 to 18,976, et al.
https://bugs.winehq.org/show_bug.cgi?id=52898
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|gdi32:font - |gdi32:font - |test_max_height() fails on |test_max_height() fails on |all Windows 10 versions |all Windows 10 versions & | |11
https://bugs.winehq.org/show_bug.cgi?id=52898
--- Comment #2 from Sagawa sagawa.aki+winebugs@gmail.com --- Update, the upper bound seems to be related to the product of height and the max character width.
Tahoma with lfHeight 20,561: tmHeight 20,561 * tmMaxCharWidth 41,762 ---> 858,668,482
MS PGothic with lfHeight 20,864: tmHeight 20,864 * tmMaxCharWidth 41,158 ---> 858,720,512
Arial with lfHeight 18,976: tmHeight 18,976 * tmMaxCharWidth 45,257 ---> 858,796,832
These values seem to be very similar, although I haven't figured out the formula. Any suggestions would be appreciated.