From 3a22236f81795ea5ab046a318722c50f5d5156d4 Mon Sep 17 00:00:00 2001 From: MStarha Date: Sun, 27 Oct 2024 10:43:20 +0100 Subject: [PATCH] Add overriding TextId for RichText --- crates/egui/src/widget_text.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/egui/src/widget_text.rs b/crates/egui/src/widget_text.rs index 03b8cbb9751..59b99844d96 100644 --- a/crates/egui/src/widget_text.rs +++ b/crates/egui/src/widget_text.rs @@ -359,6 +359,9 @@ impl RichText { || fallback_font.resolve(style), |text_style| text_style.resolve(style), ); + if let Some(fid) = style.override_font_id.clone() { + font_id = fid; + } if let Some(size) = size { font_id.size = size; }