From 96f27fffcb0cff7b32075d0e7d4ab303fa5a7fb3 Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Sat, 20 Jul 2013 10:09:37 -0600 Subject: [PATCH] Reverted 32fc794 and cd35729 --- Common/Gfx/CanvasD2D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Gfx/CanvasD2D.cpp b/Common/Gfx/CanvasD2D.cpp index 228b835b..05e3e3d5 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.widthIncludingTrailingWhitespace + 5.0f; + rect.Width = metrics.width + 5.0f; rect.Height = metrics.height + 1.0f; // 1.0f to get same result as GDI+. return true; } @@ -358,7 +358,7 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma { DWRITE_TEXT_METRICS metrics; textLayout->GetMetrics(&metrics); - rect.Width = metrics.widthIncludingTrailingWhitespace + 5.0f; + rect.Width = metrics.width + 5.0f; rect.Height = metrics.height + 1.0f; // 1.0f to get same result as GDI+. lines = metrics.lineCount; return true;