Optimize BidiParagraphs with ASCII fast path (#408)

* Optimize BidiParagraphs with ASCII fast path - Added fast path for ASCII text that avoids BidiInfo allocation - Added some text shaping benchmarks

* refactor: fix clippy warnings and cleanup imports
This commit is contained in:
romanstingler 2025-08-11 21:15:09 +02:00 committed by GitHub
parent de355a1fd9
commit e80dbc3607
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 196 additions and 30 deletions

View file

@ -454,7 +454,7 @@ impl<'a> FontFallbackIter<'a> {
}
}
}
log::debug!("failed to find family '{}'", common_family);
log::debug!("failed to find family '{common_family}'");
}
//TODO: do we need to do this?

View file

@ -147,7 +147,7 @@ impl FontSystem {
/// Create a new [`FontSystem`] with a pre-specified set of fonts.
pub fn new_with_fonts(fonts: impl IntoIterator<Item = fontdb::Source>) -> Self {
let locale = Self::get_locale();
log::debug!("Locale: {}", locale);
log::debug!("Locale: {locale}");
let mut db = fontdb::Database::new();
@ -370,7 +370,7 @@ impl FontSystem {
#[cfg(all(feature = "std", not(target_arch = "wasm32")))]
{
let elapsed = now.elapsed();
log::debug!("font matches for {:?} in {:?}", attrs, elapsed);
log::debug!("font matches for {attrs:?} in {elapsed:?}");
}
Arc::new(font_match_keys)