pub struct GlyphRun2d { /* private fields */ }Expand description
Renderer-owned positioned glyph run drawn as at most one instanced atlas batch.
A run references exactly one atlas. Mixed fallback fonts remain explicit: build one run per atlas and submit them at the same frame order. The host is responsible for shaping, baseline selection, fallback, and line breaking. An empty run is valid and emits no draw call.
Implementations§
Source§impl GlyphRun2d
impl GlyphRun2d
Sourcepub fn glyphs(&self) -> &[PositionedGlyph2d]
pub fn glyphs(&self) -> &[PositionedGlyph2d]
Returns the exact host-positioned glyph descriptions.
Sourcepub fn glyph_count(&self) -> usize
pub fn glyph_count(&self) -> usize
Returns the retained glyph count.
Sourcepub const fn bounds(&self) -> GlyphRunBounds
pub const fn bounds(&self) -> GlyphRunBounds
Returns deterministic logical-pixel bounds without font interpretation.
Sourcepub const fn budget(&self) -> GlyphRunBudget
pub const fn budget(&self) -> GlyphRunBudget
Returns creation and restoration limits.
Sourcepub fn statistics(&self) -> GlyphRunStatistics
pub fn statistics(&self) -> GlyphRunStatistics
Returns retained work counters for this run.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns exact CPU glyph and sprite-description recovery bytes.
Sourcepub fn gpu_allocation_bytes(&self) -> usize
pub fn gpu_allocation_bytes(&self) -> usize
Returns GPU instance-buffer bytes actively addressable by the run.
Auto Trait Implementations§
impl !RefUnwindSafe for GlyphRun2d
impl !UnwindSafe for GlyphRun2d
impl Freeze for GlyphRun2d
impl Send for GlyphRun2d
impl Sync for GlyphRun2d
impl Unpin for GlyphRun2d
impl UnsafeUnpin for GlyphRun2d
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