mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
parent
d67db33ecf
commit
96f27fffcb
@ -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.widthIncludingTrailingWhitespace + 5.0f;
|
rect.Width = metrics.width + 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;
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma
|
|||||||
{
|
{
|
||||||
DWRITE_TEXT_METRICS metrics;
|
DWRITE_TEXT_METRICS metrics;
|
||||||
textLayout->GetMetrics(&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+.
|
rect.Height = metrics.height + 1.0f; // 1.0f to get same result as GDI+.
|
||||||
lines = metrics.lineCount;
|
lines = metrics.lineCount;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user