zed icon indicating copy to clipboard operation
zed copied to clipboard

Font looks squeezed in

Open viz404 opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

I've loaded JetBrains font on my system and it's doesn't look same in zed compared to my terminal or other editors

Environment

Operating System: Fedora Linux 40 (Workstation Edition) x86_64 Kernel: 6.10.3-200.fc40.x86_64 Resolution: 1920x1080 DE: GNOME 46.4 Graphics Platform: Wayland CPU: Intel i5-6300U (4) @ 3.000GHz GPU: Intel Skylake GT2 [HD Graphics 520] Memory: 12 GB

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

Font rendering on zed: (everything looks squeezed in) image

On vscode for comparison: image

On Neovim on Gnome Console: image

If you notice in other places there's proper space between the letters but not on zed, and even the letters looks relaxed compared to zed.

If applicable, attach your Zed.log file to this issue.

Zed.log

 I'm a little concerned to paste my log file here in public

viz404 avatar Aug 17 '24 07:08 viz404

I think the spacing should be solved by https://github.com/zed-industries/zed/pull/16238

the letters looks relaxed compared to zed

This sounds like https://github.com/zed-industries/zed/issues/13564

apricotbucket28 avatar Aug 18 '24 14:08 apricotbucket28

  1. Can you add your zed environment (ctrl-shift-p zed: copy system specs) in the issue description?
  2. Can you also provide the relevant lines from your settings (e.g. buffer_font_family) defining which JetBrains Mono variant you are using (e.g. JetBrainsMono-Regular) so I can try and reproduce?
  3. Would you be willing to build main to see if #16238 fixes your issue?

notpeter avatar Aug 23 '24 16:08 notpeter

Sorry for responding late, right after this I bought another machine and gave this one to someone else. Thank you responding guys, although I can't confirm about this issue on the original machine but it renders just fine on my new one. Again apologies for responding late and thanks for the support.

viz404 avatar Aug 31 '24 12:08 viz404

Not sure if it relates to this specific closed issue, but I'm experiencing the same thing on my Fedora 40 machine:

1 2

I'm using JetBrains NL Mono on both IDEs, but while the font renders the font weight and antialiasing correctly in GNOME Builder, the same font looks squeezed in both editor and terminal.

I'm on a 2560 x 1440 display and running the flatpak version of Zed (v0.155.2) on Fedora 40 / Wayland. Please let me know if I can provide you with more info if that would help you find the cause of this issue.

yioannides avatar Oct 08 '24 16:10 yioannides

The Zed version is definitely not just narrower but smaller and a different weight. image

I think Zed may be defaulting to using the "JetBrains Mono Light" instead of "JetBrains Mono Regular" and at 15 point instead of 16point.

Could you try altering your settings to this:

  "buffer_font_size": 16,
  "buffer_font_family": "JetBrains Mono Regular",

Note: Zed will show red squiggles for the font name, this is harmless.

P.S. This is very much related to this issue, just with a different font. If you try and use the Zed Mono font it defaults to Zed Mono Narrow instead of Zed Mono Regular and I think you may be seeing the same thing with Light vs Regular. I have a feeling Zed may be choosing the first font alphabetically.

notpeter avatar Oct 09 '24 00:10 notpeter

  "buffer_font_size": 16,
  "buffer_font_family": "JetBrains Mono Regular",

I tried these settings, but the font family value has a yellow squiggly, because it requires just the name of the family; saving these settings defaults to another monospace font. Changing the size to 16 didn't do much either, the same narrow font as the screenshot, but larger.

I don't think it's related, since the rendering of the actual font in Zed seems completely different, but I have the command below to solve some of the issues stemming from how my HP Omen display renders text in GNOME:

FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0  |  sudo tee -a /etc/environment

yioannides avatar Oct 09 '24 06:10 yioannides