From 214fca7ca70611b673ce4d90e0137f28787bee44 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 1 Nov 2026 01:37:54 +0700 Subject: [PATCH] Character: apply() sets the font in a helper of its own --- crates/engine/src/cmd/textedit.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/textedit.rs b/crates/engine/src/cmd/textedit.rs index 958c5f10d..0efc70bc6 100644 --- a/crates/engine/src/cmd/textedit.rs +++ b/crates/engine/src/cmd/textedit.rs @@ -577,7 +577,8 @@ impl CharChange { Ok(()) } - pub(crate) fn apply(&self, st: &mut CharStyle) { + /// The font family, style and Variable Font settings of [`Self::apply`]. + fn apply_font(&self, st: &mut CharStyle) { if let Some(f) = &self.font { st.font_family = f.clone(); // Keep the style when the new family has it, else its closest match. @@ -596,6 +597,10 @@ impl CharChange { if let Some(v) = &self.font_axes { change_font_axes(st, v); } + } + + pub(crate) fn apply(&self, st: &mut CharStyle) { + self.apply_font(st); if let Some(v) = self.size { st.size = v; }