Pre-compute the fallbacks on FontFallbackIter::new

This commit is contained in:
tigregalis 2025-03-15 10:10:37 +08:00 committed by Jeremy Soller
parent ae0fb9b561
commit 7fb685fa13
2 changed files with 76 additions and 53 deletions

View file

@ -116,9 +116,6 @@ pub struct FontSystem {
/// List of fallbacks
pub(crate) fallbacks: Box<dyn Fallback>,
/// Scratch buffer for fallback list
pub(crate) scratch_fallbacks: Vec<&'static str>,
}
impl fmt::Debug for FontSystem {
@ -216,7 +213,6 @@ impl FontSystem {
shape_run_cache: crate::ShapeRunCache::default(),
shape_buffer: ShapeBuffer::default(),
fallbacks: Box::new(fallbacks),
scratch_fallbacks: Vec::new(),
}
}