D2D: Undo recent W/H calculations and revert back to 37fd105 calculations

This commit is contained in:
Brian Ferguson
2013-08-02 15:42:37 -06:00
parent bb53ddf71c
commit 1e82a1659f
3 changed files with 6 additions and 13 deletions

View File

@ -350,9 +350,8 @@ bool CanvasD2D::MeasureTextW(const WCHAR* str, UINT strLen, const TextFormat& fo
textLayout.GetAddressOf());
if (SUCCEEDED(hr))
{
std::wstring s = str;
const DWRITE_TEXT_METRICS metrics =
Util::GetAdjustedDWriteTextLayoutMetrics(textLayout.Get(), !m_AccurateText, s.rfind(L"\n") != std::wstring::npos);
Util::GetAdjustedDWriteTextLayoutMetrics(textLayout.Get(), !m_AccurateText);
rect.Width = metrics.width;
rect.Height = metrics.height;
return true;
@ -376,7 +375,7 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma
if (SUCCEEDED(hr))
{
const DWRITE_TEXT_METRICS metrics =
Util::GetAdjustedDWriteTextLayoutMetrics(textLayout.Get(), !m_AccurateText, false);
Util::GetAdjustedDWriteTextLayoutMetrics(textLayout.Get(), !m_AccurateText);
rect.Width = metrics.width;
lines = metrics.lineCount;