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
45.7k stars 2.51k forks source link

Font rendering on LoDPI displays #7992

Open rev4324 opened 6 months ago

rev4324 commented 6 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Text rendered in Zed is noticeably more blurry than other editors when using a LoDPI monitor, e.g. an external 1440p monitor like mine, or a (really) old MacBook. I'm well aware that macOS generally sucks at font rendering on non-retina screens, so to make sure my eyes aren't lying to me, I made a little comparison.

I took screenshots of the same code snippet in Zed, VSCode and Xcode and pasted them into Figma, which doesn't apply a bilinear filter when zooming images, so you can zoom in and see the per-pixel difference. Here's the comparison.

To my eyes VSCode is the sharpest, then there's XCode (which is as sharp as every other AppKit/SwiftUI app), then there's Zed with a weird 1px 50% alpha border around the text that made it really blurry. It seems like some sort of AA that doesn't work particularly well on a LoDPI display.

Environment

Zed: v0.123.2 (Zed Preview) OS: macOS 14.3.1 Memory: 8 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

rubnogueira commented 6 months ago

I second this. Using Zed with a 1080p LoDPI is very uncomfortable due to the blurriness of the font. This doesn't happen with Sublime, VSCode, or XCode.

leftbones commented 3 months ago

Seconding this as well. Zed looks great on my MacBook screen, but looks bad when I dock to my 1080p monitor. No other editor has that problem for some reason.

AlexDaniel commented 2 months ago

Another side-by-side with the same font (Zed on the left, VS Code on the right): image

Open that image at 100% zoom to see the difference.

If that image is too small at 100% zoom on your screen, I'm providing this one which is upscaled 2x.

leftbones commented 2 months ago

Oh wow that 2x side by side makes it very apparent how bad it is.

On Jun 18, 2024, at 4:50 PM, Aleks-Daniel Jakimenko-Aleksejev @.***> wrote:



Another side-by-side with the same font (VS Code on the left, Zed on the right): image.png (view on web)https://github.com/zed-industries/zed/assets/5507503/0c472dea-ec98-4d44-a5f6-ddacc1e182d8

Open that image at 100% zoom to see the difference.

If that image is too small at 100% zoom on your screen, I'm providing this one which is upscaled 2xhttps://github.com/zed-industries/zed/assets/5507503/9883d388-9728-4fc6-ae3d-10181cf3c3b0.

— Reply to this email directly, view it on GitHubhttps://github.com/zed-industries/zed/issues/7992#issuecomment-2177138016, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMD7PVJ2FOTWW7BUR27QSLZICTTBAVCNFSM6AAAAABDOO5R3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXGEZTQMBRGY. You are receiving this because you commented.Message ID: @.***>

ogau commented 1 month ago

I also came across a significantly worse font display compared to the vscode editor:

Снимок экрана от 2024-07-02 14-56-08

although there are no strong distortions in the enlarged image, visible distortions appear when changing the font size

JackNWhite commented 1 month ago

I want to mention this here (because I mentioned it also on the OTB request), but could this difference in rendering be related to scaling of the fonts? For me, Fira Code at size 15 is much smaller in Zed than in Sublime Text. image

chf0x commented 1 month ago

I am having the same issue on a HighDPI screen (Linux). Please let me know if screenshots are needed

Tiedye commented 1 month ago

Same issue as @JackNWhite but in vscode image

jsnjack commented 1 month ago

I tried few dark and light themes and the issue is much more noticeable on the light themes

Rid1FZ commented 1 month ago

Same issue here in LoDPI LCD screen(Laptop). I'm using Fedora 40, and installed Zed from the installation script.

mentalhub commented 1 month ago

Is there any quick dirty fix without recompile app from scratch? (tried font weigh more than 500, but still eyecracking)

leftbones commented 3 weeks ago

Is there any quick dirty fix without recompile app from scratch? (tried font weigh more than 500, but still eyecracking)

I don't think there's any fix, period, unless I missed something? It's a shame, I've been following this issue for quite awhile now and it's really the only thing stopping me from using Zed as my main editor. I spend a lot of time with my laptop docked, and my main monitor is only 1080p so Zed looks like garbage compared to VS Code.

AlexDaniel commented 3 weeks ago

Is there any quick dirty fix without recompile app from scratch? (tried font weigh more than 500, but still eyecracking)

I don't think there's any fix, period, unless I missed something? It's a shame, I've been following this issue for quite awhile now and it's really the only thing stopping me from using Zed as my main editor. I spend a lot of time with my laptop docked, and my main monitor is only 1080p so Zed looks like garbage compared to VS Code.

I switched to Zed even though the text, indeed, looks like garbage. I hope this gets fixed eventually. 🙏🏼

pauschuu commented 3 weeks ago

When Zed was officially released for Linux I showed it to some colleagues of mine. Some tried it out and almost all of those made a statement about the bad font rendering on Linux. They use different Linux Distros, some Wayland, some X, so there is no specific "environment" here that seems to be the problem but rather something in Zed itself?

I experimented with all the different aliasing and hinting settings but no success.

There is no way on Linux to get the same font/same size/same weight/same everything as readable as it would be in other applications like VSCode or my terminal, or basically most other applications.

Rid1FZ commented 3 weeks ago

@pauschuu zed is currently under heavy development. If you look at the release, you'll find that there is a new release almost everyday. The vim mode is not even perfect yet. The plugin system is not great. Currently it only support syntax highlighting for shell scripts. I can make a list of issues. Be patience. Obviously this issue will be fixed soon. But currently there are many major issues on linux like some panics, crashes, etc.