From 2da314fb79aa098b6053d7309435a69099b06008 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 4 Jan 2024 14:26:08 -0500 Subject: [PATCH] Fix font resolution for UI text so we render with the fallback font (#3893) This PR updates the font resolution for shaped text to use the new `resolve_font` method on the text system. This makes it so we use the fallback font if the desired font cannot be found rather than rendering nothing. Release Notes: - Fixed an issue where nothing would render when the font set in `ui_font_family` was not found. --- crates/gpui/src/text_system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/text_system.rs b/crates/gpui/src/text_system.rs index 60934b3959..3106a5a961 100644 --- a/crates/gpui/src/text_system.rs +++ b/crates/gpui/src/text_system.rs @@ -288,7 +288,7 @@ impl TextSystem { last_font = Some(run.font.clone()); font_runs.push(FontRun { len: run_len_within_line, - font_id: self.platform_text_system.font_id(&run.font)?, + font_id: self.resolve_font(&run.font), }); }