pub struct SimpleTextMeasure {
pub avg_char_width: f64,
pub line_height: f64,
}Expand description
Monospace text measurer using fixed character advance width. Uses accurate metrics for the default monospace font stack.
Fields§
§avg_char_width: f64§line_height: f64Implementations§
Source§impl SimpleTextMeasure
impl SimpleTextMeasure
Sourcepub fn measure_raw(text: &str, style: &TextStyle) -> TextSize
pub fn measure_raw(text: &str, style: &TextStyle) -> TextSize
Measure text width/height WITHOUT stripping HTML/markdown markup.
Use for text that contains literal < > characters (e.g. <<interface>>).
Trait Implementations§
Source§impl Default for SimpleTextMeasure
impl Default for SimpleTextMeasure
Source§impl TextMeasure for SimpleTextMeasure
impl TextMeasure for SimpleTextMeasure
Auto Trait Implementations§
impl Freeze for SimpleTextMeasure
impl RefUnwindSafe for SimpleTextMeasure
impl Send for SimpleTextMeasure
impl Sync for SimpleTextMeasure
impl Unpin for SimpleTextMeasure
impl UnsafeUnpin for SimpleTextMeasure
impl UnwindSafe for SimpleTextMeasure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more