pub struct ShapedTextRun {
pub font: FontData,
pub font_size: f32,
pub glyphs: Vec<ShapedGlyph>,
pub color: [u8; 4],
pub offset: f32,
pub baseline: f32,
pub normalized_coords: Vec<i16>,
}Expand description
A shaped text run — font + glyphs, ready for the renderer.
Chrome equivalent: ShapeResult::RunInfo — one run per font/script change.
Carries the font data (same type as peniko::Font — zero conversion to vello).
Fields§
§font: FontDataFont file data — parley::FontData = peniko::Font (same type).
font_size: f32Font size in CSS pixels.
glyphs: Vec<ShapedGlyph>Pre-positioned glyphs from HarfRust shaping.
color: [u8; 4]Text color as RGBA u8.
offset: f32X offset of this run within the line.
baseline: f32Baseline Y position.
normalized_coords: Vec<i16>Normalized design-space coordinates for variable font axes (e.g., wght, wdth).
Chrome: FontVariationSettings → OpenType fvar axis values.
Without these, vello renders the default instance (Regular/400)
even if HarfRust shaped at the correct weight.
Trait Implementations§
Source§impl Clone for ShapedTextRun
impl Clone for ShapedTextRun
Source§fn clone(&self) -> ShapedTextRun
fn clone(&self) -> ShapedTextRun
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShapedTextRun
impl !RefUnwindSafe for ShapedTextRun
impl Send for ShapedTextRun
impl Sync for ShapedTextRun
impl Unpin for ShapedTextRun
impl UnsafeUnpin for ShapedTextRun
impl !UnwindSafe for ShapedTextRun
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert