use crate::{ FontStyle, FontWeight, MeasureResult };
pub trait TextMeasurer {
#[allow(clippy::too_many_arguments)]
fn measure(
&mut self,
text: &str,
font: Option<&str>,
font_size: f32,
font_weight: FontWeight,
font_style: FontStyle,
letter_spacing: f32,
line_height: f32,
max_width: Option<f32>
) -> MeasureResult;
#[allow(clippy::too_many_arguments)]
fn character_offsets(
&mut self,
text: &str,
font: Option<&str>,
font_size: f32,
font_weight: FontWeight,
font_style: FontStyle,
letter_spacing: f32,
line_height: f32
) -> Vec<f32>;
fn ascent(
&mut self,
font: Option<&str>,
font_size: f32,
font_weight: FontWeight,
font_style: FontStyle
) -> f32;
fn descent(
&mut self,
font: Option<&str>,
font_size: f32,
font_weight: FontWeight,
font_style: FontStyle
) -> f32;
fn line_height(
&mut self,
font: Option<&str>,
font_size: f32,
font_weight: FontWeight,
font_style: FontStyle
) -> f32;
}