Skip to content

editor: Use a default font for the minimap#45999

Merged
MrSubidubi merged 2 commits intozed-industries:mainfrom
marcocondrache:minimap
Jan 3, 2026
Merged

editor: Use a default font for the minimap#45999
MrSubidubi merged 2 commits intozed-industries:mainfrom
marcocondrache:minimap

Conversation

@marcocondrache
Copy link
Contributor

@marcocondrache marcocondrache commented Jan 3, 2026

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>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 3, 2026
@github-actions github-actions bot added the community champion Issues filed by our amazing community champions! 🫶 label Jan 3, 2026
@marcocondrache marcocondrache marked this pull request as ready for review January 3, 2026 20:27
Copy link
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find and good fix, makes sense in that context and actually seems that VSCode does something similar for that case.

Thanks for this as well as plenty of your other PRs and happy new year! 🙂

@MrSubidubi MrSubidubi merged commit 43f7dc4 into zed-industries:main Jan 3, 2026
25 checks passed
@marcocondrache
Copy link
Contributor Author

@MrSubidubi thank you and happy new year!

@MihaelBercic
Copy link

Thank you!

@SomeoneToIgnore
Copy link
Contributor

/cherry-pick preview

github-actions bot pushed a commit that referenced this pull request Jan 4, 2026
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>
zed-zippy bot added a commit that referenced this pull request Jan 4, 2026
…review) (#46024)

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>
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
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>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#45496
Should help zed-industries#43460
And probably also zed-industries#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>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#45496
Should help zed-industries#43460
And probably also zed-industries#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion Issues filed by our amazing community champions! 🫶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom buffer font - Massive rendering lag

4 participants