From 15da87c5fb9cefd9baf28923913f0ff83ee87f89 Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Sun, 4 Jan 2026 13:43:53 +0000 Subject: [PATCH] editor: Use a default font for the minimap (#45999) (cherry-pick to preview) (#46024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-pick of #45999 to preview ---- Closes #45496 Should help #43460 And probably also #44503 The minimap usually renders about 10x more lines of code and shaped text than the editor. With expensive fonts such as Google Sans Code, this can cause noticeable lag, since we attempt to synthesize 300+ lines of code using a heavy font. Because minimap text is rendered at around 2px and is essentially illegible, it doesn’t make sense to use the custom buffer font. Release Notes: - Improved minimap performance when using custom fonts --------- Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com> Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com> Co-authored-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com> --- crates/editor/src/editor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index f4a83f900da68d90803b82c0aec1287fcaa71cd3..6e6091ec8a7a37be324359de25d16c120b68882f 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -20355,6 +20355,7 @@ impl Editor { cx: &mut Context, ) -> Entity { const MINIMAP_FONT_WEIGHT: gpui::FontWeight = gpui::FontWeight::BLACK; + const MINIMAP_FONT_FAMILY: SharedString = SharedString::new_static(".ZedMono"); let mut minimap = Editor::new_internal( EditorMode::Minimap { @@ -20370,6 +20371,7 @@ impl Editor { minimap.set_text_style_refinement(TextStyleRefinement { font_size: Some(MINIMAP_FONT_SIZE), font_weight: Some(MINIMAP_FONT_WEIGHT), + font_family: Some(MINIMAP_FONT_FAMILY), ..Default::default() }); minimap.update_minimap_configuration(minimap_settings, cx);