1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

TextLayout: Enforce character wrapping attribute

This commit is contained in:
Oliver James 2025-06-25 15:02:48 +01:00 committed by Attila Szarvas
parent 5b4fca7bd0
commit 7a30354ce9

View file

@ -421,6 +421,9 @@ void TextLayout::createStandardLayout (const AttributedString& text)
if (text.getWordWrap() != AttributedString::none)
shapedTextOptions = shapedTextOptions.withWordWrapWidth (width);
if (text.getWordWrap() == AttributedString::WordWrap::byChar)
shapedTextOptions = shapedTextOptions.withAllowBreakingInsideWord (true);
ShapedText st { text.getText(), shapedTextOptions };
std::optional<int64> lastLineNumber;