Module: wine Branch: master Commit: e29e4caca3bb914556cf66fd95165ca5ebce152a URL: http://source.winehq.org/git/wine.git/?a=commit;h=e29e4caca3bb914556cf66fd95...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Fri Sep 20 00:57:52 2013 +0900
gdiplus: Fix empty glyph handling.
---
dlls/gdiplus/graphics.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 79e4c7c..a642bd8 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -6242,11 +6242,15 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI /* Generate a mask for the text */ for (i=0; i<length; i++) { + DWORD ret; int left, top, stride;
- GetGlyphOutlineW(hdc, text[i], ggo_flags, + ret = GetGlyphOutlineW(hdc, text[i], ggo_flags, &glyphmetrics, max_glyphsize, glyph_mask, &identity);
+ if (ret == GDI_ERROR || ret == 0) + continue; /* empty glyph */ + left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x; top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y; stride = (glyphmetrics.gmBlackBoxX + 3) & (~3);