pub struct LineMetrics {
pub ascent: f32,
pub descent: f32,
pub line_gap: f32,
}Expand description
Vertical metrics of a font at a given size, in pixels (y up: descent is negative).
Fields§
§ascent: f32Distance from the baseline to the top of tall glyphs.
descent: f32Distance from the baseline to the bottom of descenders; negative.
line_gap: f32Extra space the font recommends between lines.
Implementations§
Source§impl LineMetrics
impl LineMetrics
Sourcepub fn line_height(&self) -> f32
pub fn line_height(&self) -> f32
Baseline-to-baseline distance.
Trait Implementations§
Source§impl Clone for LineMetrics
impl Clone for LineMetrics
impl Copy for LineMetrics
Source§impl Debug for LineMetrics
impl Debug for LineMetrics
Source§impl PartialEq for LineMetrics
impl PartialEq for LineMetrics
impl StructuralPartialEq for LineMetrics
Auto Trait Implementations§
impl Freeze for LineMetrics
impl RefUnwindSafe for LineMetrics
impl Send for LineMetrics
impl Sync for LineMetrics
impl Unpin for LineMetrics
impl UnsafeUnpin for LineMetrics
impl UnwindSafe for LineMetrics
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