Alexandre Julliard pushed to branch master at wine / wine
Commits: d6770e59 by Jiangyi Chen at 2025-10-17T17:52:02+02:00 user32/tests: Add some tests for uiLengthDrawn calculation in DrawTextExW().
- - - - - 385405a4 by Jiangyi Chen at 2025-10-17T17:52:02+02:00 user32: Fix uiLengthDrawn calculation in DrawTextExW().
uiLengthDrawn should represent the number of characters that have been processed. However, the original implementation uses len (the count of displayed characters in the current line), which is not accurate.
When text requires line breaks or special processing (such as adding an ellipsis), the actual number of processed characters may differ from the number of displayed characters.
When the DT_CALCRECT flag is absent, len gets decremented to 0 during the drawing loop.
Consequently, uiLengthDrawn becomes inaccurate since it relies on len's value for statistics.
- - - - -
2 changed files:
- dlls/user32/tests/text.c - dlls/user32/text.c
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/684847469d28e04df8936965ee2305...