gdiplus: Don't expand the drawing area to include empty glyphs.
This commit is contained in:
parent
ce9de5c4bb
commit
85b989c1fa
|
@ -6208,6 +6208,8 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
|
||||||
if (glyphsize > max_glyphsize)
|
if (glyphsize > max_glyphsize)
|
||||||
max_glyphsize = glyphsize;
|
max_glyphsize = glyphsize;
|
||||||
|
|
||||||
|
if (glyphsize != 0)
|
||||||
|
{
|
||||||
left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
|
left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
|
||||||
top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
|
top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
|
||||||
right = pti[i].x + glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
|
right = pti[i].x + glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
|
||||||
|
@ -6217,6 +6219,7 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
|
||||||
if (top < min_y) min_y = top;
|
if (top < min_y) min_y = top;
|
||||||
if (right > max_x) max_x = right;
|
if (right > max_x) max_x = right;
|
||||||
if (bottom > max_y) max_y = bottom;
|
if (bottom > max_y) max_y = bottom;
|
||||||
|
}
|
||||||
|
|
||||||
if (i+1 < length && (flags & DriverStringOptionsRealizedAdvance) == DriverStringOptionsRealizedAdvance)
|
if (i+1 < length && (flags & DriverStringOptionsRealizedAdvance) == DriverStringOptionsRealizedAdvance)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue