DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Fonts: system_fonts_cataloged builds on wasm
con3code65f0b37920f7
diff --git a/crates/fonts/src/fontdb.rs b/crates/fonts/src/fontdb.rsindex c631f3020..60c5835c7 100644--- a/crates/fonts/src/fontdb.rs+++ b/crates/fonts/src/fontdb.rs@@ -884,7 +884,10 @@ impl FontDb {/// Whether the installed fonts are cataloged: a lookup by family name won't wait for the/// scan (always true on wasm, which has none). See [`FontDb::scan_in_background`].pub fn system_fonts_cataloged(&self) -> bool {- cfg!(target_arch = "wasm32") || self.cataloged.get().is_some()+ #[cfg(target_arch = "wasm32")]+ return true;+ #[cfg(not(target_arch = "wasm32"))]+ self.cataloged.get().is_some()}/// Catalog the installed fonts on a background thread, so the first lookup by family name