From e3df030be97c427b070cfee648cc2daf07ae35f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Legrand?= Date: Sat, 31 Oct 2026 20:45:51 +0100 Subject: [PATCH] fix(text): M2.1: simplify font file filter --- crates/text/src/fontdb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs index 2c6aac948..6ebd7ec45 100644 --- a/crates/text/src/fontdb.rs +++ b/crates/text/src/fontdb.rs @@ -1304,7 +1304,7 @@ fn index_font_file(path: &std::path::Path, meta: &std::fs::Metadata, out: &mut B return; } let ext = path.extension().and_then(std::ffi::OsStr::to_str).map(str::to_ascii_lowercase).unwrap_or_default(); - if !matches!(ext.as_str(), "ttf" | "otf" | "ttc" | "otc") && !(path.extension().is_none() && starts_like_a_font(path)) { + if !(matches!(ext.as_str(), "ttf" | "otf" | "ttc" | "otc") || path.extension().is_none() && starts_like_a_font(path)) { return; } // Very large files are indexed all the same (Apple Color Emoji is ~180 MB and is where the