Module: wine Branch: master Commit: 23acdb7143569e2c0839f6f88c4462f2ed98068b URL: http://source.winehq.org/git/wine.git/?a=commit;h=23acdb7143569e2c0839f6f88c...
Author: Massimo Del Fedele max@veneto.com Date: Mon Mar 30 19:49:04 2009 +0200
gdi32: Correctly handle space char on Path_ExtTextOut().
---
dlls/gdi32/path.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 3ad551e..195f413 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -1460,16 +1460,20 @@ BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc, void *outline;
dwSize = GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, 0, NULL, &identity); - if (!dwSize) return FALSE; + if (dwSize == GDI_ERROR) return FALSE;
- outline = HeapAlloc(GetProcessHeap(), 0, dwSize); - if (!outline) return FALSE; + /* add outline only if char is printable */ + if(dwSize) + { + outline = HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!outline) return FALSE;
- GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, dwSize, outline, &identity); + GetGlyphOutlineW(hdc, str[idx], GGO_GLYPH_INDEX | GGO_NATIVE, &gm, dwSize, outline, &identity);
- PATH_add_outline(dc, org.x + x + xoff, org.x + y + yoff, outline, dwSize); + PATH_add_outline(dc, org.x + x + xoff, org.x + y + yoff, outline, dwSize);
- HeapFree(GetProcessHeap(), 0, outline); + HeapFree(GetProcessHeap(), 0, outline); + }
if (dx) {