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
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/626
In preparation for nulldrv display modes support.
--
v8: win32u: Move display placement logic out of graphics drivers.
win32u: Move full display mode lookup out of graphics drivers.
win32u: Use current mode position if desired mode doesn't specify it.
win32u: Always copy devmode in validate_display_settings.
win32u: Read registry or current mode when validation needs it.
win32u: Do not keep display modes driver extra in the registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/576
On Wed Aug 10 12:00:48 2022 +0000, Piotr Caban wrote:
> The __Fiopen function is a stub in msvcp70. So there's no difference
> between setting it to `_MSVCP_VER >= 70` or `_MSVCP_VER >= 71` (I didn't
> test what's the expected behavior with msvcp70 since it's not available
> on my machine). The `_MSVCP_VER <= 90` check comes from the test I have
> attached to your last merge request (I had to add more dll versions to
> the test to validate how each version works).
I built the demo by vs2003/vs2005/vs2008, and it printed 'read: ok' for vs2003 building, but printed 'open file failed!' for vs2005/vs2008 buildings.
I think "\_MSVCP_VER >= 71" can change to "\_MSVCP_VER >= 80" at least.
And I think it's a bug on vs2005/vs2008, do we have to be exactly the same as windows? Why do we keep this bug?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/606#note_6382
On Wed Aug 17 03:48:19 2022 +0000, Piotr Caban wrote:
> There's no need to close the MR if patches needs updating. You can
> force-push updated version. This way all the comments will be preserved.
Thank you.
This is my first attempt to commit a patch using gitlab, and I'm not quite sure how to do.
Thanks for your guidance, I won't close merge request directly next time.
I see that the patch has been merged in, I think I can close this merge request this time.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/606#note_6381