pub struct ZenithGlyphRun {
pub font_id: String,
pub font_size: f32,
pub ascent: f32,
pub descent: f32,
pub line_height: f32,
pub advance_width: f32,
pub glyphs: Vec<PositionedGlyph>,
}Expand description
A shaped run of text in a single resolved font.
All values are in pixels. No third-party types appear in any field.
Fields§
§font_id: StringStable id of the resolved font face (matches FontData::id).
The renderer re-resolves font bytes via FontProvider::by_id.
font_size: f32Font size at which the run was shaped, in pixels.
ascent: f32Ascent in pixels, positive above the baseline.
Baseline placement: box_top + ascent.
descent: f32Descent magnitude in pixels (positive value; baseline to bottom of descenders).
line_height: f32Recommended line height in pixels: ascent + descent + line_gap.
advance_width: f32Total pen advance across the run in pixels.
glyphs: Vec<PositionedGlyph>Positioned glyphs, baseline-relative, in run order.
Trait Implementations§
Source§impl Clone for ZenithGlyphRun
impl Clone for ZenithGlyphRun
Source§fn clone(&self) -> ZenithGlyphRun
fn clone(&self) -> ZenithGlyphRun
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 moreSource§impl Debug for ZenithGlyphRun
impl Debug for ZenithGlyphRun
Source§impl PartialEq for ZenithGlyphRun
impl PartialEq for ZenithGlyphRun
Source§fn eq(&self, other: &ZenithGlyphRun) -> bool
fn eq(&self, other: &ZenithGlyphRun) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ZenithGlyphRun
Auto Trait Implementations§
impl Freeze for ZenithGlyphRun
impl RefUnwindSafe for ZenithGlyphRun
impl Send for ZenithGlyphRun
impl Sync for ZenithGlyphRun
impl Unpin for ZenithGlyphRun
impl UnsafeUnpin for ZenithGlyphRun
impl UnwindSafe for ZenithGlyphRun
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