[2/2] gdiplus: Don't expand the drawing area to include empty glyphs.
Vincent Povirk
madewokherd at gmail.com
Fri Sep 20 13:52:40 CDT 2013
-------------- next part --------------
From 800bc28163269f1e9226a5d742f005d511047f24 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Fri, 20 Sep 2013 13:15:54 -0500
Subject: [PATCH 2/2] gdiplus: Don't expand the drawing area to include empty
glyphs.
---
dlls/gdiplus/graphics.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 1a07c03..b63a5fe 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -6208,15 +6208,18 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
if (glyphsize > max_glyphsize)
max_glyphsize = glyphsize;
- left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
- top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
- right = pti[i].x + glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
- bottom = pti[i].y - glyphmetrics.gmptGlyphOrigin.y + glyphmetrics.gmBlackBoxY;
-
- if (left < min_x) min_x = left;
- if (top < min_y) min_y = top;
- if (right > max_x) max_x = right;
- if (bottom > max_y) max_y = bottom;
+ if (glyphsize != 0)
+ {
+ left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
+ top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
+ right = pti[i].x + glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
+ bottom = pti[i].y - glyphmetrics.gmptGlyphOrigin.y + glyphmetrics.gmBlackBoxY;
+
+ if (left < min_x) min_x = left;
+ if (top < min_y) min_y = top;
+ if (right > max_x) max_x = right;
+ if (bottom > max_y) max_y = bottom;
+ }
if (i+1 < length && (flags & DriverStringOptionsRealizedAdvance) == DriverStringOptionsRealizedAdvance)
{
--
1.8.1.2
More information about the wine-patches
mailing list