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: f32The y coordinate of the baseline of this line, in pixels.
padding: f32How 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: f32The 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: f32The 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: f32The 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: f32A 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: usizeThe GlyphPosition index of the first glyph in the line.
glyph_end: usizeThe 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 moreSource§impl Debug for LinePosition
impl Debug for LinePosition
Source§impl Default for LinePosition
impl Default for LinePosition
Source§fn default() -> LinePosition
fn default() -> LinePosition
impl Copy for LinePosition
Auto Trait Implementations§
impl Freeze for LinePosition
impl RefUnwindSafe for LinePosition
impl Send for LinePosition
impl Sync for LinePosition
impl Unpin for LinePosition
impl UnwindSafe for LinePosition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().