pub struct FontMetrics { /* private fields */ }Expand description
A Font’s measures: the text laid out as Font::layout lays it out,
with no markup, so that a caret is where the glyphs are drawn.
Implementations§
Trait Implementations§
Source§impl Debug for FontMetrics
impl Debug for FontMetrics
Source§impl TextMetrics for FontMetrics
impl TextMetrics for FontMetrics
Source§fn line_height(&self) -> f32
fn line_height(&self) -> f32
The height of a line.
Source§fn caret_x(&self, text: &str, byte: usize) -> f32
fn caret_x(&self, text: &str, byte: usize) -> f32
Where the pen is before the character at
byte of the one-line
text, from the text’s start: the kerning before that character
included, and spaces taking their room. At text.len(), it is the
pen after the last character, the text’s width. byte is a
character boundary of text, or its length.Auto Trait Implementations§
impl !Freeze for FontMetrics
impl !RefUnwindSafe for FontMetrics
impl !Sync for FontMetrics
impl Forget for FontMetrics
impl Move for FontMetrics
impl Send for FontMetrics
impl Unpin for FontMetrics
impl UnsafeUnpin for FontMetrics
impl UnwindSafe for FontMetrics
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