mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
TextLayout: Enforce character wrapping attribute
This commit is contained in:
parent
5b4fca7bd0
commit
7a30354ce9
1 changed files with 3 additions and 0 deletions
|
|
@ -421,6 +421,9 @@ void TextLayout::createStandardLayout (const AttributedString& text)
|
||||||
if (text.getWordWrap() != AttributedString::none)
|
if (text.getWordWrap() != AttributedString::none)
|
||||||
shapedTextOptions = shapedTextOptions.withWordWrapWidth (width);
|
shapedTextOptions = shapedTextOptions.withWordWrapWidth (width);
|
||||||
|
|
||||||
|
if (text.getWordWrap() == AttributedString::WordWrap::byChar)
|
||||||
|
shapedTextOptions = shapedTextOptions.withAllowBreakingInsideWord (true);
|
||||||
|
|
||||||
ShapedText st { text.getText(), shapedTextOptions };
|
ShapedText st { text.getText(), shapedTextOptions };
|
||||||
|
|
||||||
std::optional<int64> lastLineNumber;
|
std::optional<int64> lastLineNumber;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue