Skip to content

Commit 775df4d

Browse files
committed
Prevent accidental word wrap
In case of long node names D2D1MeasureText wraps the text. Hovewer this is not the case of the other contexts on both platforms.
1 parent 90dd3ff commit 775df4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/WindowsAppSupport/WAS_Direct2DUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ NUIE::Size D2D1MeasureText (IDWriteFactory* directWriteFactory, ID2D1RenderTarge
206206
{
207207
IDWriteTextLayout* textLayout = nullptr;
208208
IDWriteTextFormat* textFormat = CreateTextFormat (directWriteFactory, renderTarget, font);
209-
directWriteFactory->CreateTextLayout (text.c_str (), (UINT32) text.length (), textFormat, 1000.0, 1000.0, &textLayout);
209+
directWriteFactory->CreateTextLayout (text.c_str (), (UINT32) text.length (), textFormat, FLT_MAX, FLT_MAX, &textLayout);
210210
DWRITE_TEXT_METRICS metrics;
211211
textLayout->GetMetrics (&metrics);
212212
SafeRelease (&textLayout);

0 commit comments

Comments
 (0)