pub struct Line {
pub runs: Vec<ShapedRun>,
pub spans: Spans,
pub boxes: Vec<InlineFragment>,
pub width: u32,
pub overhang: f32,
pub protrusion: f32,
pub box_: LineBox,
}Expand description
One typeset line: shaped runs plus its width in font units.
A line is a band of the page, which is set in one span or in several. The runs are in reading order across all of them.
Fields§
§runs: Vec<ShapedRun>The line’s runs, in visual order.
spans: SpansThe spans the runs are divided between, in reading order.
boxes: Vec<InlineFragment>The boxes the inline elements on the line paint there, outermost first. Empty on the ordinary line of a book.
width: u32Advance of the line’s glyphs, trailing spaces excluded; a
hyphenated line’s hyphen is charged here even though the glyph
joins the runs when the structured outpur paints it. What hangs
past the measure is charged here too, and taken off again by
overhang and protrusion.
overhang: f32Points the line’s last glyph hangs past the measure.
protrusion: f32Points the line’s first glyph hangs before the line’s origin.
box_: LineBoxThe line’s vertical geometry — computed here, in points; downstream stages position against it, never re-measure.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.