pub struct CachedFontTextMeasurer { /* private fields */ }Implementations§
Source§impl CachedFontTextMeasurer
impl CachedFontTextMeasurer
pub fn with_text_resources( text_resources: SoftwareTextResources, capacity: usize, ) -> Self
Trait Implementations§
Source§impl TextMeasurer for CachedFontTextMeasurer
impl TextMeasurer for CachedFontTextMeasurer
fn measure(&self, text: &AnnotatedString, style: &TextStyle) -> TextMetrics
fn get_offset_for_position( &self, text: &AnnotatedString, style: &TextStyle, x: f32, _y: f32, ) -> usize
fn get_cursor_x_for_offset( &self, text: &AnnotatedString, style: &TextStyle, offset: usize, ) -> f32
fn layout(&self, text: &AnnotatedString, style: &TextStyle) -> TextLayoutResult
Source§fn choose_auto_hyphen_break(
&self,
line: &str,
style: &TextStyle,
segment_start_char: usize,
measured_break_char: usize,
) -> Option<usize>
fn choose_auto_hyphen_break( &self, line: &str, style: &TextStyle, segment_start_char: usize, measured_break_char: usize, ) -> Option<usize>
Returns an alternate break boundary for
Hyphens::Auto when a greedy break
split lands in the middle of a word. Read morefn measure_for_node( &self, node_id: Option<usize>, text: &AnnotatedString, style: &TextStyle, ) -> TextMetrics
fn measure_subsequence( &self, text: &AnnotatedString, range: Range<usize>, style: &TextStyle, ) -> TextMetrics
fn measure_subsequence_for_node( &self, node_id: Option<usize>, text: &AnnotatedString, range: Range<usize>, style: &TextStyle, ) -> TextMetrics
fn measure_line_prefix_widths( &self, text: &AnnotatedString, line_range: Range<usize>, style: &TextStyle, ) -> Option<TextLinePrefixWidths>
fn measure_line_width( &self, text: &AnnotatedString, line_range: Range<usize>, style: &TextStyle, ) -> Option<f32>
fn line_height(&self, text: &AnnotatedString, style: &TextStyle) -> f32
fn line_height_for_node( &self, node_id: Option<usize>, text: &AnnotatedString, style: &TextStyle, ) -> f32
fn measure_with_options( &self, text: &AnnotatedString, style: &TextStyle, options: TextLayoutOptions, max_width: Option<f32>, ) -> TextMetrics
fn measure_with_options_for_node( &self, node_id: Option<usize>, text: &AnnotatedString, style: &TextStyle, options: TextLayoutOptions, max_width: Option<f32>, ) -> TextMetrics
fn prepare_with_options( &self, text: &AnnotatedString, style: &TextStyle, options: TextLayoutOptions, max_width: Option<f32>, ) -> PreparedTextLayout
fn prepare_with_options_for_node( &self, node_id: Option<usize>, text: &AnnotatedString, style: &TextStyle, options: TextLayoutOptions, max_width: Option<f32>, ) -> PreparedTextLayout
fn prepare_with_options_fallback( &self, text: &AnnotatedString, style: &TextStyle, options: TextLayoutOptions, max_width: Option<f32>, ) -> PreparedTextLayout
Auto Trait Implementations§
impl !Freeze for CachedFontTextMeasurer
impl !RefUnwindSafe for CachedFontTextMeasurer
impl !Send for CachedFontTextMeasurer
impl !Sync for CachedFontTextMeasurer
impl !UnwindSafe for CachedFontTextMeasurer
impl Unpin for CachedFontTextMeasurer
impl UnsafeUnpin for CachedFontTextMeasurer
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