pub struct SimpleGlyphRun {
pub glyphs: Vec<GlyphInstance>,
pub color: ColorU,
pub background_color: Option<ColorU>,
pub background_content: Vec<StyleBackgroundContent>,
pub border: Option<InlineBorderInfo>,
pub font_hash: u64,
pub font_size_px: f32,
pub text_decoration: TextDecoration,
pub is_ime_preview: bool,
pub source_node_id: Option<NodeId>,
}Expand description
A simple glyph run without font reference - used when fonts aren’t available. The font can be looked up later via font_hash if needed.
Fields§
§glyphs: Vec<GlyphInstance>The glyphs in this run, with their positions relative to the start of the run.
color: ColorUThe color of the text in this glyph run.
background_color: Option<ColorU>Background color for this run (rendered behind text)
background_content: Vec<StyleBackgroundContent>Full background content layers (for gradients, images, etc.)
border: Option<InlineBorderInfo>Border information for inline elements
font_hash: u64A hash of the font, useful for caching purposes.
font_size_px: f32The font size in pixels.
text_decoration: TextDecorationText decoration (underline, strikethrough, overline)
is_ime_preview: boolWhether this is an IME composition preview (should be rendered with special styling)
source_node_id: Option<NodeId>The source DOM node that generated this text run (for hit-testing)
Trait Implementations§
Source§impl Clone for SimpleGlyphRun
impl Clone for SimpleGlyphRun
Source§fn clone(&self) -> SimpleGlyphRun
fn clone(&self) -> SimpleGlyphRun
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SimpleGlyphRun
impl RefUnwindSafe for SimpleGlyphRun
impl Send for SimpleGlyphRun
impl Sync for SimpleGlyphRun
impl Unpin for SimpleGlyphRun
impl UnsafeUnpin for SimpleGlyphRun
impl UnwindSafe for SimpleGlyphRun
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 more