From 572f2da0d2ac782ca5d54e40a1752c56665fbd16 Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Tue, 30 Jul 2013 17:01:16 -0600 Subject: [PATCH] D2D: Tweaks --- Common/Gfx/CanvasD2D.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Common/Gfx/CanvasD2D.cpp b/Common/Gfx/CanvasD2D.cpp index a29aba13..52429d6f 100644 --- a/Common/Gfx/CanvasD2D.cpp +++ b/Common/Gfx/CanvasD2D.cpp @@ -319,7 +319,7 @@ void CanvasD2D::DrawTextW(const WCHAR* str, UINT strLen, const TextFormat& forma formatD2D.m_TextLayout->GetFontSize(0, &xOffset); xOffset /= 6.0f; - if (!m_AccurateText) + if (!m_AccurateText && m_TextAntiAliasing) { float emOffset = xOffset / 25.0f; @@ -357,8 +357,8 @@ bool CanvasD2D::MeasureTextW(const WCHAR* str, UINT strLen, const TextFormat& fo float size = 0.0f; textLayout->GetFontSize(0, &size); - rect.Width = floor(metrics.width + (size / 2.05f) + (metrics.width / 46.0f) - 0.5f); - rect.Height = floor(metrics.height + (size / 10.0f) + 0.3f); + rect.Width = floor(metrics.width + (size / 2.05f) + (metrics.width / 55.0f) - 0.5f); + rect.Height = floor(metrics.height + (size / 9.25f) + 0.3f); } else { @@ -394,8 +394,8 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma float size = 0.0f; textLayout->GetFontSize(0, &size); - rect.Width = floor(metrics.width + (size / 2.05f) + (metrics.width / 46.0f) - 0.5f); - rect.Height = floor(metrics.height + (size / 10.0f) + 0.3f); + rect.Width = floor(metrics.width + (size / 2.05f) + (metrics.width / 55.0f) - 0.5f); + rect.Height = floor(metrics.height + (size / 9.25f) + 0.3f); } else {