From d098f55d4b483c5c3b56b0193891b4b24330dce3 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 5 Aug 2003 19:17:40 +0000 Subject: [PATCH] Use same formula to convert from device to logical units as everywhere else. --- objects/font.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/objects/font.c b/objects/font.c index 05824db6fcd..bdc613a729f 100644 --- a/objects/font.c +++ b/objects/font.c @@ -1425,7 +1425,7 @@ UINT WINAPI GetOutlineTextMetricsW( BOOL WINAPI GetCharWidth32W( HDC hdc, UINT firstChar, UINT lastChar, LPINT buffer ) { - UINT i, extra; + UINT i; BOOL ret = FALSE; DC * dc = DC_GetDCPtr( hdc ); if (!dc) return FALSE; @@ -1438,10 +1438,8 @@ BOOL WINAPI GetCharWidth32W( HDC hdc, UINT firstChar, UINT lastChar, if (ret) { /* convert device units to logical */ - - extra = dc->vportExtX >> 1; for( i = firstChar; i <= lastChar; i++, buffer++ ) - *buffer = (*buffer * dc->wndExtX + extra) / dc->vportExtX; + *buffer = INTERNAL_XDSTOWS(dc, *buffer); ret = TRUE; } GDI_ReleaseObj( hdc ); -- 2.11.4.GIT