Author: jimtabor Date: Tue Nov 17 16:51:59 2015 New Revision: 69926
URL: http://svn.reactos.org/svn/reactos?rev=69926&view=rev Log: [Win32SS|RTL] - Patch by Andrew Eikum : Use font default height if GetTextExtentPoint returns empty rectangle. - Wine port sync.
Modified: trunk/reactos/win32ss/user/rtl/text.c
Modified: trunk/reactos/win32ss/user/rtl/text.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/rtl/text.c?rev... ============================================================================== --- trunk/reactos/win32ss/user/rtl/text.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/rtl/text.c [iso-8859-1] Tue Nov 17 16:51:59 2015 @@ -85,10 +85,17 @@ 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 @@ } else { -#ifdef _WIN32K_ - TEXTMETRICW tm; - GreGetTextMetricsW( hdc, &tm ); -#else - TEXTMETRICA tm; - GetTextMetricsA( hdc, &tm ); -#endif defWidth = 8 * tm.tmAveCharWidth; }
@@ -178,6 +178,10 @@ count -= j; lpstr += j; } + + if(!extent.cy) + extent.cy = tm.tmHeight; + return MAKELONG(x - start, extent.cy); }