git.lucas.co / cce-data-editor
structured data editor
git clone https://git.lucas.co/cce-data-editor.git

commit13410ddb12824c10a92dcbc88695074213c9d2ee
parente69d2fb219
authorLucas Galante <[email protected]>
date2026-09-18 15:35
fix: context menu labels in the menu font

The shared menu's label run was drawn with `None` for the family — a
TextLabel carries only a size — so the menu rendered in the default
sans while the surface under it wore the configured face. The family
now comes from `context_menu::label_font()`, the same face the labels
were laid out in. (The menu body here is still the legacy flat
`extra_quads` box rather than the DE's lit plate; that is a separate
question.)

Co-Authored-By: Claude Opus 5 <[email protected]>

 src/main.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 5b300df..e2e059c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2252,6 +2252,10 @@ impl Application for DataEditorApp {
                 for (qx, qy, qw, qh, qc) in cce_ui::widget::context_menu::extra_quads() {
                     pc.quad(Rect { x: qx, y: qy, width: qw, height: qh }, qc);
                 }
+                // The menu font's family: a TextLabel carries only a size, so
+                // `None` here drew the menu in the default sans while the
+                // labels had been laid out in the configured face.
+                let (menu_family, _) = cce_ui::widget::context_menu::label_font();
                 for label in cce_ui::widget::context_menu::text_labels() {
                     pc.text_with(
                         label.text.clone(),
@@ -2259,7 +2263,7 @@ impl Application for DataEditorApp {
                         label.y,
                         label.font_size,
                         label.color,
-                        None,
+                        Some(menu_family.clone()),
                         menu_bounds,
                     );
                 }