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
49.51k stars 3.02k forks source link

Text rendering seems too thick #12835

Open didier opened 5 months ago

didier commented 5 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

CleanShot 2024-06-10 at 10 35 33@2x

Font: Berkeley Mono Variable Font Weight: 400

Compare VS Code (left) to Zed (right). Irregardless of my font, the rendering of text strokes in Zed seems thicker throughout. This makes Zed look less crispy on high-end displays and harder to read on low-end displays.

Environment

Zed: v0.138.6 (Zed) OS: macOS 14.5.0 Memory: 32 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.

No response

Moshyfawn commented 5 months ago

This seems to echo what was said in #7992. I'm going to close this: be sure to +👍 and follow the other thread. However, if you think it's unrelated, let us know so we can reopen it.

Duplicate of:

didier commented 5 months ago

@Moshyfawn Hmm, not sure I agree—on my high DPI MBP the text still doesn't look correct. But I suppose it's worse on low DPI.

SlowBrainDude commented 3 months ago

I see the same issue. (On Linux, under X11, with quite current system, running Debian Testing).

It's more or less the opposite of #7992: My (TrueType) font (DejaVu) looks pixelated (and fat), not blurry.

zed-text-rendering

Compared to proper rendering:

native-text-rendering

This could be broken hinting, or some issues with antialiasing.

And that's not the only issue with font-rending in zed. What one can also see here is the broken kerning.

In the screenshot the thread opener provided < flows into / in the script tag. In my example the letter combinations "re" and "es" have clearly issues. The zed rendering is more "compressed" and uneven.

And the very next issue is missing sub-pixel rendering…

(Not sure I should open separate tickets about all that, as there are already many font rendering related ones; maybe they should get merged instead as it's more or less the same overall issue?)

To be honest: In case you're trying to do your own font-rendering, just stop that, and use FreeType. FreeType went through decades of fine tuning. You will never reach anything even close in quality. Proper font-rending is a life task. Concentrate on a good editor instead, as what I see looks quite promising! :tada: (I just hope there shows up somewhere some build that removes all that annoying AI and online services nonsense. Such things should be plugins! Maybe even you could provide such "light" builds... 😉)

Nevertheless, thanks for building Zed! Looking forward to move away form VSC as AI, Azure, and GitHub enshittification gets stronger there with every release (and that are more or less the only areas anything moves at all by now; invocation stopped in VSC quite some time ago frankly).