gdi32: Hack for resize the text rectangles in 1c8 (eterbug #2097)
authorIlya Shpigor <shpigor@etersoft.ru>
Tue, 23 Jun 2009 05:40:16 +0000 (09:40 +0400)
committerVitaly Lipatov <lav@etersoft.ru>
Wed, 15 Jul 2009 17:27:52 +0000 (21:27 +0400)
dlls/gdi32/font.c

index 1dd1b363850fc82352096e020b63ded2a369f213..7e05ed2a377a11890c90e717bcc60fb12fc1d9ce 100644 (file)
@@ -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;