Font weight does not change if set under a value of 500
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
The bug:
As can be seen in the attached screen recording, Zed does not change font weight unless the values under the "ui_font_weight" or "buffer_font_weight" properties is set to a number higher than 500.
https://github.com/zed-industries/zed/assets/170600677/fca292ba-7354-4d37-a005-9301cae836a1
Steps to reproduce:
- In the settings.json file, add "ui_font_weight" and "buffer_font_weight" properties
- Set one or both of them to a value less than or equal to 500. The font weight in the editor should not change.
- Set one or both of them to a value greater than 500. The font, as expected should become quite bold.
Environment
Zed: v0.143.6 (Zed) OS: macOS 14.5.0 Memory: 8 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
[Zed.log](https://github.com/user-attachments/files/16174401/Zed.log)
I could replicate it with the default font, however after switching ui_font_family to Noto Sans for the sake of experimenting with the font weight, I could finally notice a difference when switching from 400 to 500.
Same issue on Linux too
Zed: v0.143.7 OS: Fedora Linux 40 Memory: 16 GiB
Same. Zed: v0.146.5 Font: JetBrains Mono OS: Ubuntu 24.04 LTS Memory: 16 GiB
For my font of choice (Ubuntu Mono), setting buffer_font_weight to any value (100 or 900) in settings.json has no effect at all. Likewise, changing font_weight or font_style in the theme JSON shows no effect.
Same with most other fonts (Droid Sans Mono, Noto Mono, ...), although some, such as Zed Plex Mono, exhibit a binary behaviour: they look too thin at "buffer_font_weight": 500 and any other value below, but too thick at "buffer_font_weight": 501 and any other value above.
Switching between Wayland and Xorg doesn't make a difference.
Zed: v0.152.3 Font: Ubuntu Mono OS: Ubuntu 24.04.1 LTS Memory: 16 GiB Architecture: x86_64
This actually seems to be a duplicate of https://github.com/zed-industries/zed/issues/13564
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
@github-actions nope
It's really a dupe of #13564 though.
I think this is a broader issue with font rendering. I use a variable font (PragmataPro VF) and Zed doesn't accept arbitrary font weights - instead there are random discrete "jumps" at certain weights.
The following show that the font renders identically at weights of 301 and 399 (when there should be a clearly perceptible difference), but there's a noticeable jump from 399 to 400 (which should look the same for all intents and purposes):
(Zed 0.185.16 on macOS 15.4.1, haven't tested on Linux yet)
I'am facing the same issue:
Zed: v0.196.6 Font: Ubuntu Mono OS: Ubuntu 24.04 LTS Memory: 16 GiB
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!