Struct Fallback Text
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>
impl<'f> FallbackText<'f>
pub fn text(&self) -> &str
pub fn options(&self) -> TextOptions<'_>
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>]
pub fn missing_ranges(&self) -> &[Range<usize>]
Unresolved complete logical graphemes, sorted in original source order.