Skip to main content

wrap_text

Function wrap_text 

Source
pub fn wrap_text(text: &str, max_w: f32, font_scale: f32) -> Vec<String>
Expand description

Break text into lines that fit within max_w pixels at font_scale. Words that are longer than one line get hard-broken at the character boundary.