Make sure ascent/descent values don't become negative after coordinate
mapping.
This commit is contained in:
parent
9634233407
commit
9a900aa279
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue