diff --git a/node-graph/nodes/text/src/text_context.rs b/node-graph/nodes/text/src/text_context.rs index 7934feb885..37e71e4b53 100644 --- a/node-graph/nodes/text/src/text_context.rs +++ b/node-graph/nodes/text/src/text_context.rs @@ -3,7 +3,7 @@ use core::cell::RefCell; use core_types::table::Table; use glam::DVec2; use parley::fontique::{Blob, FamilyId, FontInfo}; -use parley::{AlignmentOptions, FontContext, Layout, LayoutContext, LineHeight, PositionedLayoutItem, StyleProperty}; +use parley::{AlignmentOptions, FontContext, Layout, LayoutContext, LineHeight, OverflowWrap, PositionedLayoutItem, StyleProperty}; use std::collections::HashMap; use vector_types::Vector; @@ -77,6 +77,7 @@ impl TextContext { builder.push_default(StyleProperty::FontStyle(font_info.style())); builder.push_default(StyleProperty::FontWidth(font_info.width())); builder.push_default(LineHeight::FontSizeRelative(typesetting.line_height_ratio as f32)); + builder.push_default(StyleProperty::OverflowWrap(OverflowWrap::BreakWord)); let mut layout: Layout<()> = builder.build(text);