Struct Text Font Stack
pub struct TextFontStack<'f> { /* private fields */ }Expand description
Copied ordered references. The actual fonts remain consumer-owned.
Implementations§
§impl<'f> TextFontStack<'f>
impl<'f> TextFontStack<'f>
pub fn new(fonts: &[&'f TextFont]) -> Result<Self, TextError>
pub fn new(fonts: &[&'f TextFont]) -> Result<Self, TextError>
Borrow 1..16 faces in priority order; no implicit resources or deduplication.
pub fn fonts(&self) -> &[&'f TextFont]
pub fn shape(
&self,
text: &str,
options: TextOptions<'_>,
) -> Result<FallbackText<'f>, TextError>
pub fn shape( &self, text: &str, options: TextOptions<'_>, ) -> Result<FallbackText<'f>, TextError>
Shape <=4096 UTF8 bytes, explicit four-ASCII-letter script/direction and existing text options. Select the first font that shapes each complete extended grapheme without glyph zero, using original context; adjacent same-face units shape together. Default ignorables participate in shaping then disappear from glyph output. Missing units use the primary replacement and retain explicit source ranges. Final unexpected missing glyphs for covered source reject the whole result. Output <=256 runs/16384 glyphs; probe count <=8192. Backend transient memory/time is not globally bounded. No cross-font ligatures/presentation guarantee.