zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.17k stars 3.08k forks source link

Setting font to Jetbrains Mono makes the editor render gibberish #6717

Closed jamesgecko closed 1 month ago

jamesgecko commented 9 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

My editor looks like this:

Screenshot 2024-01-25 at 12 21 38 PM

The following settings.json can cause it. Just setting the font to JetBrains Mono breaks everything. Other fonts such as Arial and Menlo work fine. JetBrains Mono renders fine in other editors on my system.

{
  "buffer_font_family": "JetBrains Mono"
}

Version 0.119.18 worked fine yesterday, but today both it and 0.119.19 render everything incorrectly.

Environment

Zed: v0.119.19 (Zed) OS: macOS 14.2.1 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

tml commented 9 months ago

I am unable to reproduce this in Zed 0.119.20, with or without Jetbrains Mono being installed into Font Book:

image
jamesgecko commented 9 months ago

Maybe it's related to a specific version of the font I'm using? Here's what's in my /Library/fonts directory. JetBrainsMono fonts.zip

I noticed something odd. If I set my terminal font, some things aren't scrambled. Everything I type and stdout is scrambled, but parts of my starship prompt come through normally (the ascii fish and git branch name)

Screenshot 2024-01-29 at 11 38 06 AM

tml commented 9 months ago

Maybe it's related to a specific version of the font I'm using? Here's what's in my /Library/fonts directory. JetBrainsMono fonts.zip

I deleted Jetbrains Mono from Font Book and installed using your zip file and still everything looks OK on my end. Are you on the .20 release? Do you have anything else in your settings.json?

tml commented 9 months ago

Maybe try clearing your font cache?

jamesgecko commented 9 months ago

I installed the font from the homebrew/cask-fonts/font-jetbrains-mono Homebrew cask; it's on whatever the latest version of that is. I also manually installed the Nerd Font version of the font from https://github.com/ryanoasis/nerd-fonts/ on June 4, 2023. That version of the font works fine, weirdly.

This is my current settings.json, but I can reliably reproduce with it completely empty except for the buffer_font_family property.

{
  "theme": "Ayu Mirage",
  "buffer_font_family": "Menlo",
  "buffer_font_size": 12,
  "ui_font_size": 15,
  "ui_font_family": "System Font",
  "buffer_line_height": "standard",
  "vim_mode": true,
  "base_keymap": "VSCode",
  "features": {
    "copilot": false
  },
  "terminal": {
    "dock": "right",
    "font_family": "Menlo",
    "font_size": 12,
    "line_height": "standard"
  }
  // "telemetry": {
  //     "diagnostics": false,
  //     "metrics": false
  // }
}

I'll try clearing the font cache, although I'm using this font in Visual Studio Code and iTerm without issues.

jamesgecko commented 9 months ago

I closed applications, ran sudo atsutil databases -remove in Terminal, and rebooted. No change.

(The atsutil server -shutdown command displays a message that the ATS utility is unsupported in macOS 14)

github-actions[bot] commented 1 month ago

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed. Thanks for your help!

github-actions[bot] commented 1 month ago

This issue was closed due to inactivity. If you're still experiencing this problem, feel free to ping a Zed team member to reopen this issue or open a new one.