zed icon indicating copy to clipboard operation
zed copied to clipboard

Setting font to Jetbrains Mono makes the editor render gibberish

Open jamesgecko opened this issue 1 year ago • 6 comments
trafficstars

Check for existing issues

  • [X] Completed

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

jamesgecko avatar Jan 25 '24 17:01 jamesgecko

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

tml avatar Jan 29 '24 09:01 tml

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

jamesgecko avatar Jan 29 '24 16:01 jamesgecko

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 avatar Jan 29 '24 16:01 tml

Maybe try clearing your font cache?

tml avatar Jan 29 '24 16:01 tml

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 avatar Jan 29 '24 16:01 jamesgecko

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)

jamesgecko avatar Jan 29 '24 16:01 jamesgecko