AUDIO
Source snapshot · 12 October 2026

API reference / ravet_surface::fallback::FallbackText

Struct FallbackText 

pub struct FallbackText<'f> { /* private fields */ }
Expand description

Complete immutable source/matched-face output. Cannot outlive supplied fonts. Glyph clusters preserve source bytes; ignorable source remains even without glyphs.

use ravet_surface::{fallback::TextFontStack, text::{TextFont,TextOptions}};
fn escape<'a>(bytes:&[u8],options:TextOptions<'_>) -> ravet_surface::fallback::FallbackText<'a> {
    let font=TextFont::from_bytes(bytes,0).unwrap();
    TextFontStack::new(&[&font]).unwrap().shape("hello",options).unwrap()
}

Implementations§

§

impl<'f> FallbackText<'f>

pub fn text(&self) -> &str

pub fn options(&self) -> TextOptions<'_>

Copied shaping style used for probes/final output, independent of caller buffers.

pub fn size(&self) -> f64

pub fn direction(&self) -> TextDirection

pub fn runs(&self) -> &[FallbackRun<'f>]

pub fn missing_ranges(&self) -> &[Range<usize>]

Unresolved complete logical graphemes, sorted in original source order.

pub fn glyph_count(&self) -> usize

pub fn missing_glyphs(&self) -> usize

pub fn advance(&self) -> (f64, f64)

pub fn probes(&self) -> usize

Auto Trait Implementations§

§

impl<'f> !RefUnwindSafe for FallbackText<'f>

§

impl<'f> !UnwindSafe for FallbackText<'f>

§

impl<'f> Freeze for FallbackText<'f>

§

impl<'f> Send for FallbackText<'f>

§

impl<'f> Sync for FallbackText<'f>

§

impl<'f> Unpin for FallbackText<'f>

§

impl<'f> UnsafeUnpin for FallbackText<'f>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for Twhere T: 'static,

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.