File 0002-win32u-NtGdiExtTextOutW-should-translate-x-y-from-lo.patch of Package wine
From b608f6eeff34ba6da1b99dfedccf52d789887753 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 22 Nov 2023 11:51:23 +0300
Subject: [PATCH 2/2] win32u: NtGdiExtTextOutW() should translate x,y from
logical to device units at the last step.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/win32u/font.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c
index 2e6c8eeb986..3f5ef981765 100644
--- a/dlls/win32u/font.c
+++ b/dlls/win32u/font.c
@@ -5877,12 +5877,6 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
goto done;
}
- pt.x = x;
- pt.y = y;
- lp_to_dp(dc, &pt, 1);
- x = pt.x;
- y = pt.y;
-
char_extra = dc->attr->char_extra;
if (char_extra && lpDx && NtGdiGetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASPRINTER)
char_extra = 0; /* Printer drivers don't add char_extra if lpDx is supplied */
@@ -5979,8 +5973,6 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
width = desired[1];
}
- tm.tmAscent = abs(INTERNAL_YWSTODS(dc, tm.tmAscent));
- tm.tmDescent = abs(INTERNAL_YWSTODS(dc, tm.tmDescent));
switch( align & (TA_LEFT | TA_RIGHT | TA_CENTER) )
{
case TA_LEFT:
@@ -6048,6 +6040,12 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *lpr
}
}
+ pt.x = x;
+ pt.y = y;
+ lp_to_dp(dc, &pt, 1);
+ x = pt.x;
+ y = pt.y;
+
ret = physdev->funcs->pExtTextOut( physdev, x, y, (flags & ~ETO_OPAQUE), &rc,
str, count, (INT*)deltas );
--
2.50.0