Commit 9959aca8 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

GetTextExtentPoint should include an inter character spacing set by

SetTextCharacterExtra.
parent b0c790c6
...@@ -1047,12 +1047,11 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag ...@@ -1047,12 +1047,11 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
SIZE tmpsz; SIZE tmpsz;
deltas = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT)); deltas = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT));
for(i = 0; i < count; i++) { for(i = 0; i < count; i++) {
deltas[i] = char_extra;
if(lpDx) if(lpDx)
deltas[i] += lpDx[i]; deltas[i] = lpDx[i] + char_extra;
else { else {
GetTextExtentPointI(hdc, glyphs + i, 1, &tmpsz); GetTextExtentPointI(hdc, glyphs + i, 1, &tmpsz);
deltas[i] += tmpsz.cx; deltas[i] = tmpsz.cx;
} }
} }
} else if(lpDx) } else if(lpDx)
......
...@@ -974,6 +974,7 @@ BOOL WINAPI GetTextExtentPoint32W( ...@@ -974,6 +974,7 @@ BOOL WINAPI GetTextExtentPoint32W(
ret = WineEngGetTextExtentPoint(dc->gdiFont, str, count, size); ret = WineEngGetTextExtentPoint(dc->gdiFont, str, count, size);
size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx));
size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy));
size->cx += count * dc->charExtra;
} }
else if(dc->funcs->pGetTextExtentPoint) else if(dc->funcs->pGetTextExtentPoint)
ret = dc->funcs->pGetTextExtentPoint( dc->physDev, str, count, size ); ret = dc->funcs->pGetTextExtentPoint( dc->physDev, str, count, size );
...@@ -1008,6 +1009,7 @@ BOOL WINAPI GetTextExtentPointI( ...@@ -1008,6 +1009,7 @@ BOOL WINAPI GetTextExtentPointI(
ret = WineEngGetTextExtentPointI(dc->gdiFont, indices, count, size); ret = WineEngGetTextExtentPointI(dc->gdiFont, indices, count, size);
size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx));
size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy));
size->cx += count * dc->charExtra;
} }
else if(dc->funcs->pGetTextExtentPoint) { else if(dc->funcs->pGetTextExtentPoint) {
FIXME("calling GetTextExtentPoint\n"); FIXME("calling GetTextExtentPoint\n");
......
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