pub struct LinePosition {
    pub baseline_y: f32,
    pub padding: f32,
    pub max_ascent: f32,
    pub min_descent: f32,
    pub max_line_gap: f32,
    pub max_new_line_size: f32,
    pub line_start: usize,
    pub line_end: usize,
    /* private fields */
}
Expand description

Metrics about a positioned line.

Fields

baseline_y: f32

The y coordinate of the baseline of this line, in pixels.

padding: f32

How much empty space is left at the end of the line before any alignment. If no max width is specified, f32::MAX is used.

max_ascent: f32

The highest point that any glyph in the font extends to above the baseline. Typically positive. If there are multiple styles on this line, this their max value.

min_descent: f32

The lowest point that any glyph in the font extends to below the baseline. Typically negative. If there are multiple styles on this line, this their max value.

max_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. If there are multiple styles on this line, this their max value.

max_new_line_size: f32

A precalculated value for the of the line depending. It’s calculated by: ascent - descent + line_gap. If there are multiple styles on this line, this their min value.

line_start: usize

The GlyphPosition index of the first glyph in the line.

line_end: usize

The GlyphPosition index of the last glyph in the line.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.