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 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 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 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 max 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
sourceimpl Clone for LinePosition
impl Clone for LinePosition
sourcefn clone(&self) -> LinePosition
fn clone(&self) -> LinePosition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LinePosition
impl Debug for LinePosition
sourceimpl Default for LinePosition
impl Default for LinePosition
impl Copy for LinePosition
Auto Trait Implementations
impl RefUnwindSafe for LinePosition
impl Send for LinePosition
impl Sync for LinePosition
impl Unpin for LinePosition
impl UnwindSafe for LinePosition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more