From: James McDonnell <topgamer7(a)gmail.com> This resulted in cases where the calculated height could be negative. Fixing this resolves the text rendering issues in StudioTax. The check for height in GdipAddPathRectangle would fail, and the X and Y coordinates of the bounds would not be set. --- dlls/gdiplus/graphics.c | 2 +- dlls/gdiplus/tests/graphics.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index aaf04d60961..e7f49a7e646 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5452,7 +5452,7 @@ GpStatus gdip_format_string(GpGraphics *graphics, HDC hdc, { if (format->attr & StringFormatFlagsLineLimit) break; - bounds.Height = nheight - (height + size.cy); + bounds.Height = nheight - height; } else bounds.Height = size.cy; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 74dff64a944..651c3b32e51 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4667,7 +4667,6 @@ static void test_measure_string(void) expectf(0.0, bounds.X); expectf(0.0, bounds.Y); expectf(width, bounds.Width); - todo_wine expectf(height / 2.0, bounds.Height); range.First = 0; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5360