Struct fontdue::layout::LinePosition
source · 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 glyph_start: usize,
pub glyph_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 is 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 is their min 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 is 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 is their max value.
glyph_start: usize
The GlyphPosition index of the first glyph in the line.
glyph_end: usize
The GlyphPosition index of the last glyph in the line.
Trait Implementations§
source§impl Clone for LinePosition
impl Clone for LinePosition
source§fn clone(&self) -> LinePosition
fn clone(&self) -> LinePosition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more