Make sure ascent/descent values don't become negative after coordinate

mapping.
This commit is contained in:
Krzysztof Foltman 2004-04-29 20:01:23 +00:00 committed by Alexandre Julliard
parent 9634233407
commit 9a900aa279
2 changed files with 4 additions and 4 deletions

View File

@ -176,8 +176,8 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
sz.cy = PSDRV_YWStoDS(physDev, sz.cy);
GetTextMetricsW(physDev->hdc, &tm);
ascent = PSDRV_YWStoDS(physDev, tm.tmAscent);
descent = PSDRV_YWStoDS(physDev, tm.tmDescent);
ascent = abs(PSDRV_YWStoDS(physDev, tm.tmAscent));
descent = abs(PSDRV_YWStoDS(physDev, tm.tmDescent));
TRACE("textAlign = %x\n", align);
switch(align & (TA_LEFT | TA_CENTER | TA_RIGHT) ) {

View File

@ -1083,8 +1083,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
GetTextMetricsW(hdc, &tm);
tm.tmAscent = X11DRV_YWStoDS(physDev, tm.tmAscent);
tm.tmDescent = X11DRV_YWStoDS(physDev, tm.tmDescent);
tm.tmAscent = abs(X11DRV_YWStoDS(physDev, tm.tmAscent));
tm.tmDescent = abs(X11DRV_YWStoDS(physDev, tm.tmDescent));
switch( align & (TA_LEFT | TA_RIGHT | TA_CENTER) ) {
case TA_LEFT:
if (align & TA_UPDATECP) {