[PATCH v2 5/5] win32u: Simplify get_text_metr_size.

Jacek Caban wine at gitlab.winehq.org
Mon Jun 13 02:03:43 CDT 2022


From: Jacek Caban <jacek at codeweavers.com>

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
 dlls/win32u/sysparams.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 7c333953f7e..0b6053a5ab9 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -2743,14 +2743,13 @@ static LONG get_char_dimensions( HDC hdc, TEXTMETRICW *metric, LONG *height )
 
 /* get text metrics and/or "average" char width of the specified logfont
  * for the specified dc */
-static void get_text_metr_size( HDC hdc, LOGFONTW *plf, TEXTMETRICW *metric, UINT *psz)
+static void get_text_metr_size( HDC hdc, LOGFONTW *lf, TEXTMETRICW *metric, UINT *psz )
 {
-    ENUMLOGFONTEXDVW exdv = { .elfEnumLogfontEx.elfLogFont = *plf };
     HFONT hfont, hfontsav;
     TEXTMETRICW tm;
     UINT ret;
     if (!metric) metric = &tm;
-    hfont = NtGdiHfontCreate( &exdv, sizeof(exdv), 0, 0, NULL );
+    hfont = NtGdiHfontCreate( lf, sizeof(*lf), 0, 0, NULL );
     if (!hfont || !(hfontsav = NtGdiSelectFont( hdc, hfont )))
     {
         metric->tmHeight = -1;
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/232



More information about the wine-devel mailing list