Manipulating the font size results in the script_cache going stale. From MSDN[1]
`The application should never pass the same handle for different fonts or different sizes.`
This is however exactly what happens when the font size changes as a result of zooming(both in and out). ScriptShape and relative functions will only inspect the hardware device context only if the required data is not cached[2] and hence the data from a previous call to these functions is retrieved even though the font size has changed hence the bug where text both doesn't wrap and doesn't paint as it should.
In patch one, I have tried to keep track of the script_cache objects alongside the relevant font.
Patch two fixes an issue where the cursor doesn't scale after zooming until after one interacts with the editor.
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
1. https://docs.microsoft.com/en-us/windows/win32/intl/caching
2. https://docs.microsoft.com/en-us/windows/win32/intl/script-cache
--
v2: riched20: update caret on zooming
riched20: Cache script_cache alongside font cache
https://gitlab.winehq.org/wine/wine/-/merge_requests/626
Fix Battle Realms: Zen Edition failing to start. The game expects to find a device without
D3DDEVCAPS_HWTRANSFORMANDLIGHT.
--
v2: ddraw: Don't report unsupported device capabilities in d3d3_EnumDevices().
ddraw: Don't report unsupported device capabilities in d3d7_EnumDevices().
ddraw/tests: Add more capability tests for enumerated devices.
ddraw/tests: Move the capability tests for enumerated devices.
ddraw/tests: Add a comment to note that tests in d3d.c are deprecated.
https://gitlab.winehq.org/wine/wine/-/merge_requests/670
On Tue Aug 23 01:19:06 2022 +0000, Davide Beatrici wrote:
> The example at https://docs.microsoft.com/en-us/windows/win32/learnwin32/example--the-open…:
> ```
> x86_64-w64-mingw32-g++ open_dialog_box.cpp -municode -lole32 -luuid -o open_dialog_box
> ```
> ![](/uploads/4e8c5b8ee3df0c9242638683c9690d6b/image.png)
> ![](/uploads/f8bfa92da7e09844e7f5a1444299a508/image.png)
> I confirm pressing Enter when the address bar is focused does not change
> the location.
Thanks @davidebeatrici, I'll try to fix that, for my next commit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6705
On Tue Aug 23 00:10:52 2022 +0000, Davide Beatrici wrote:
> ![](/uploads/25abbb18e0c5980412b0d6a1455140f1/image.png)
Would you like me to perform specific tests?
The screenshots I sent are of `explorer`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6702