From 65f0b37920f75d8b443b00388a8b23846634e2c9 Mon Sep 17 00:00:00 2001 From: con3code Date: Sun, 11 Oct 2026 10:00:17 +0900 Subject: [PATCH] Fonts: system_fonts_cataloged builds on wasm `cfg!` doesn't remove the expression, and `cataloged` only exists off wasm, so `cargo xtask wasm` failed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013phQ3ekq6uGBEWD6FjFYG2 --- crates/fonts/src/fontdb.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/fonts/src/fontdb.rs b/crates/fonts/src/fontdb.rs index 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