gdiplus: Fix empty glyph handling.

This commit is contained in:
Akihiro Sagawa 2013-09-20 00:57:52 +09:00 committed by Alexandre Julliard
parent 33e05eb6c5
commit e29e4caca3
1 changed files with 5 additions and 1 deletions

View File

@ -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);