mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +00:00
[Win32SS|RTL]
- Patch by Andrew Eikum : Use font default height if GetTextExtentPoint returns empty rectangle. - Wine port sync. svn path=/trunk/; revision=69926
This commit is contained in:
parent
a681850f56
commit
4871d817fe
1 changed files with 11 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue