Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blurry font rendering (on Linux at least) #11676

Open
1 task done
VorpalBlade opened this issue May 10, 2024 · 1 comment
Open
1 task done

Blurry font rendering (on Linux at least) #11676

VorpalBlade opened this issue May 10, 2024 · 1 comment
Labels
defect [core label] font Font feedback for readability, size, style, etc

Comments

@VorpalBlade
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

So I tried the pre-alpha of Zed on Linux (I don't have a Mac), built it with cargo build --release) but it seems that font rendering doesn't work properly on low-DPI monitors (I only have a pair of old ~96 DPI monitors). Zed is ignoring my system wide font settings of full hinting, greyscale antialiasing which make such screens work. This results in very blurry rendering.

I tried a variety of fonts that work fine in other editors. For example "Terminus (TTF)" which is a bitmap font (converted to TTF) and should render with no anti-aliasing whatsoever. This works fine in VSCode.

Dejavu Sans Mono is better, but again Zed doesn't seem to be rendering like other programs on my system

Here is my ~/.config/fontconfig/fonts.conf (which i would expect to take effect for all programs on the system):

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit name="rgba" mode="assign">
   <const>none</const>
  </edit>
 </match>
 <match target="font">
  <edit name="hinting" mode="assign">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit name="hintstyle" mode="assign">
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font">
  <edit name="antialias" mode="assign">
   <bool>true</bool>
  </edit>
 </match>
 <alias>
  <family>Terminus (TTF)</family>
  <default>
   <family>monospace</family>
  </default>
 </alias>
 <match>
  <test compare="eq" name="family">
   <string>sans-serif</string>
  </test>
  <test compare="eq" name="family">
   <string>monospace</string>
  </test>
  <edit mode="delete" name="family"/>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

As is it is, on my monitor Zed is too blurry to be usable (I'm really sensitive to blurry fonts and get literal headaches from it). I could also not find a way to turn off antialiasing entirely (which might be an acceptable workaround) in https://zed.dev/docs/configuring-zed (there is no mention of "antialias" at all in the page.

Environment

Zed: v1.0.0 (Zed Dev df190ea)
OS: Linux 1.0.0 (actually this is Arch Linux, I think this command is a bit broken?)
Memory: 31 GiB
Architecture: x86_64

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

Blurry font rendering in Zed (sharp in VSCode) when using "Terminus (TTF)" (both at size 18), which is a bitmap font, best viewed at 1:1 pixels on a 96 DPI screen, or at an exact scaling (e.g. 200%) on a higher DPI screen:
Terminus TTF

When using "Dejavu Sans Mono" the difference is smaller, but Zed is still blurrier. Both are at font size 18 again:
Dejavu Sans Mono

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Apparently I don't have a log file:

image

@VorpalBlade VorpalBlade added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 10, 2024
@Moshyfawn Moshyfawn added font Font feedback for readability, size, style, etc and removed triage Maintainer needs to classify the issue labels May 11, 2024
@Moshyfawn
Copy link
Contributor

Related #4334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] font Font feedback for readability, size, style, etc
Projects
None yet
Development

No branches or pull requests

3 participants