[][src]Struct fontdue::LineMetrics

pub struct LineMetrics {
    pub ascent: f32,
    pub descent: f32,
    pub line_gap: f32,
    pub new_line_size: f32,
}

Metrics associated with line positioning.

Fields

ascent: f32

The highest point that any glyph in the font extends to above the baseline. Typically positive.

descent: f32

The lowest point that any glyph in the font extends to below the baseline. Typically negative.

line_gap: f32

The gap to leave between the descent of one line and the ascent of the next. This is of course only a guideline given by the font's designers.

new_line_size: f32

A precalculated value for the height or width of the line depending on if the font is laid out horizontally or vertically. It's calculated by: ascent - descent + line_gap.

Trait Implementations

impl Clone for LineMetrics[src]

impl Copy for LineMetrics[src]

impl Debug for LineMetrics[src]

impl PartialEq<LineMetrics> for LineMetrics[src]

impl StructuralPartialEq for LineMetrics[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.