From 32fc7948eeada839b5d009873cd63eea1662262f Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Sat, 29 Jun 2013 23:44:56 -0600 Subject: [PATCH] CanvasD2D: Fix for trailing whitespace http://rainmeter.net/forum/viewtopic.php?p=89139#p89139 --- Common/Gfx/CanvasD2D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/Gfx/CanvasD2D.cpp b/Common/Gfx/CanvasD2D.cpp index 05e3e3d5..10eaf7c3 100644 --- a/Common/Gfx/CanvasD2D.cpp +++ b/Common/Gfx/CanvasD2D.cpp @@ -334,7 +334,7 @@ bool CanvasD2D::MeasureTextW(const WCHAR* str, UINT strLen, const TextFormat& fo { DWRITE_TEXT_METRICS metrics; textLayout->GetMetrics(&metrics); - rect.Width = metrics.width + 5.0f; + rect.Width = metrics.widthIncludingTrailingWhitespace + 5.0f; rect.Height = metrics.height + 1.0f; // 1.0f to get same result as GDI+. return true; }