From 2bbca90cd7cbd2b54f96315a3132c440df68d2e1 Mon Sep 17 00:00:00 2001 From: Travis Michielsen Date: Fri, 7 Sep 2001 15:28:32 +0000 Subject: [PATCH] Fixed behavior of GetTextExtentExPointW. It must always return the extents of the entire string in size. --- objects/font.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/objects/font.c b/objects/font.c index 62080cb766e..b369eef9fa4 100644 --- a/objects/font.c +++ b/objects/font.c @@ -1173,16 +1173,15 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, /* FIXME - justification needs doing yet. Remember that the base * data will not be in logical coordinates. */ - if( !lpnFit || extent+tSize.cx <= maxExt ) + extent += tSize.cx; + if( !lpnFit || extent <= maxExt ) /* It is allowed to be equal. */ { - extent+=tSize.cx; nFit++; - str++; if( alpDx ) alpDx[index] = extent; - if( tSize.cy > size->cy ) size->cy = tSize.cy; } - else break; + if( tSize.cy > size->cy ) size->cy = tSize.cy; + str++; } size->cx = extent; if(lpnFit) *lpnFit = nFit;