Commit 9a900aa2 authored by Krzysztof Foltman's avatar Krzysztof Foltman Committed by Alexandre Julliard

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

mapping.
parent 96342334
......@@ -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) ) {
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment