diff --git a/reactos/win32ss/user/rtl/text.c b/reactos/win32ss/user/rtl/text.c index e5311706ca5..b8cdfc76f5d 100644 --- a/reactos/win32ss/user/rtl/text.c +++ b/reactos/win32ss/user/rtl/text.c @@ -85,10 +85,17 @@ LONG TEXT_TabbedTextOut( HDC hdc, SIZE extent; int i, j; int start = x; + TEXTMETRICW tm; if (!lpTabPos) cTabStops=0; +#ifdef _WIN32K_ + GreGetTextMetricsW( hdc, &tm ); +#else + GetTextMetricsW( hdc, &tm ); +#endif + if (cTabStops == 1) { defWidth = *lpTabPos; @@ -96,13 +103,6 @@ LONG TEXT_TabbedTextOut( HDC hdc, } else { -#ifdef _WIN32K_ - TEXTMETRICW tm; - GreGetTextMetricsW( hdc, &tm ); -#else - TEXTMETRICA tm; - GetTextMetricsA( hdc, &tm ); -#endif defWidth = 8 * tm.tmAveCharWidth; } @@ -178,6 +178,10 @@ LONG TEXT_TabbedTextOut( HDC hdc, count -= j; lpstr += j; } + + if(!extent.cy) + extent.cy = tm.tmHeight; + return MAKELONG(x - start, extent.cy); }