From d2e3794fa89da5106571b12b1d5f319ac7cfac53 Mon Sep 17 00:00:00 2001 From: Andy Terra <152812+airstrike@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:56:49 -0500 Subject: [PATCH] Log when default font family match fails due to weight mismatch Uses missing_warn! (debug or warn depending on warn_on_missing_glyphs feature) to surface when a requested family cannot be matched at the desired weight, which is the root cause of variable font fallback issues. --- src/font/fallback/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/font/fallback/mod.rs b/src/font/fallback/mod.rs index 3b9aaaf..7ee9a6f 100644 --- a/src/font/fallback/mod.rs +++ b/src/font/fallback/mod.rs @@ -331,7 +331,14 @@ impl<'a> FontFallbackIter<'a> { } match (is_mono, default_font_match_key.as_ref()) { - (false, None) => break 'DEF_FAM, + (false, None) => { + missing_warn!( + "No default font match for {:?} at weight {}", + self.default_families[self.default_i - 1], + self.ideal_weight.0, + ); + break 'DEF_FAM; + } (false, Some(m_key)) => { if let Some(font) = self.font_system.get_font(m_key.id, self.ideal_weight) { return Some(font);