CanvasD2D: Fix for trailing whitespace

http://rainmeter.net/forum/viewtopic.php?p=89139#p89139
This commit is contained in:
Brian Ferguson 2013-06-29 23:44:56 -06:00
parent 05964e9f7f
commit 32fc7948ee

View File

@ -334,7 +334,7 @@ bool CanvasD2D::MeasureTextW(const WCHAR* str, UINT strLen, const TextFormat& fo
{ {
DWRITE_TEXT_METRICS metrics; DWRITE_TEXT_METRICS metrics;
textLayout->GetMetrics(&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+. rect.Height = metrics.height + 1.0f; // 1.0f to get same result as GDI+.
return true; return true;
} }