pub struct TextMetrics {
pub width: f32,
pub height: f32,
pub ascent: f32,
pub descent: f32,
pub line_height: f32,
}Expand description
The size of text shaped with one font, from
Cx::measure_text, in logical pixels.
Fields§
§width: f32The advance of the widest line.
height: f32The line boxes: one line height per line.
ascent: f32How far the font rises above the baseline at this size.
descent: f32How far the font reaches below the baseline at this size, positive.
line_height: f32The height of one line, as a Text with this font has.
Trait Implementations§
Source§impl Clone for TextMetrics
impl Clone for TextMetrics
impl Copy for TextMetrics
Source§impl Debug for TextMetrics
impl Debug for TextMetrics
Source§impl Default for TextMetrics
impl Default for TextMetrics
Source§impl PartialEq for TextMetrics
impl PartialEq for TextMetrics
impl StructuralPartialEq for TextMetrics
Auto Trait Implementations§
impl Forget for TextMetrics
impl Freeze for TextMetrics
impl Move for TextMetrics
impl RefUnwindSafe for TextMetrics
impl Send for TextMetrics
impl Sync for TextMetrics
impl Unpin for TextMetrics
impl UnsafeUnpin for TextMetrics
impl UnwindSafe for TextMetrics
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