Skip to main content

clip_text_to_width

Function clip_text_to_width 

Source
pub fn clip_text_to_width(ctx: &dyn DrawCtx, text: &str, max_w: f64) -> String
Expand description

Trim text from the end with an ellipsis until it fits max_w, using the current font/size on ctx.