pub trait SizableText {
// Required methods
fn set_font(&mut self, font: FontSelector, dpem: f32);
fn measure_width(&mut self, max_width: f32) -> f32;
fn measure_height(&mut self, wrap_width: f32) -> f32;
}
Expand description
Required functionality on Text
objects for sizing by the theme
Required Methods§
Sourcefn set_font(&mut self, font: FontSelector, dpem: f32)
fn set_font(&mut self, font: FontSelector, dpem: f32)
Set font face and size
Sourcefn measure_width(&mut self, max_width: f32) -> f32
fn measure_width(&mut self, max_width: f32) -> f32
Measure required width, up to some max_width
Sourcefn measure_height(&mut self, wrap_width: f32) -> f32
fn measure_height(&mut self, wrap_width: f32) -> f32
Measure required vertical height, wrapping as configured