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.
This commit is contained in:
Marshall Bowers 2024-01-04 14:26:08 -05:00 committed by GitHub
parent e4aa7ba4f2
commit 2da314fb79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,7 +288,7 @@ impl TextSystem {
last_font = Some(run.font.clone()); last_font = Some(run.font.clone());
font_runs.push(FontRun { font_runs.push(FontRun {
len: run_len_within_line, len: run_len_within_line,
font_id: self.platform_text_system.font_id(&run.font)?, font_id: self.resolve_font(&run.font),
}); });
} }