From 8b086b2028ef0f042fce22728f3b71eb5776d1fa Mon Sep 17 00:00:00 2001 From: Ilya Shpigor Date: Tue, 23 Jun 2009 09:40:16 +0400 Subject: [PATCH] gdi32: Hack for resize the text rectangles in 1c8 (eterbug #2097) --- dlls/gdi32/font.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 1dd1b36385..7e05ed2a37 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -36,6 +36,8 @@ #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/etersoft.h" + WINE_DEFAULT_DEBUG_CHANNEL(font); /* Device -> World size conversion */ @@ -1742,13 +1744,20 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, if(flags & (ETO_CLIPPED | ETO_OPAQUE)) { - if(!lprect) - { - if(flags & ETO_GLYPH_INDEX) - GetTextExtentPointI(hdc, glyphs, count, &sz); - else - GetTextExtentPointW(hdc, reordered_str, count, &sz); + BOOL resize = FALSE; + + if(flags & ETO_GLYPH_INDEX) + GetTextExtentPointI(hdc, glyphs, count, &sz); + else + GetTextExtentPointW(hdc, reordered_str, count, &sz); + LOADETER_FUNC(etersoft_1version); + if(etersoft_1version && (etersoft_1version() == 8)) + if(lprect && ((lprect->right - lprect->left) < sz.cx)) + resize = TRUE; + + if(!lprect || resize) + { done_extents = TRUE; rc.left = x; rc.top = y; -- 2.33.8