pop-os / cosmic-text

Pure Rust multi-line text handling
https://pop-os.github.io/cosmic-text/cosmic_text/
Apache License 2.0
1.56k stars 95 forks source link

Text is blurry #106

Closed ales-tsurko closed 1 year ago

ales-tsurko commented 1 year ago

I'm on macOS 13.2.1, with M1. When I run the editor-libcosmic example, the text looks blurry compared to native text. Some time ago I head this issue with nuklear. It was related to antialiasing. (Notice also on the screenshot some symbols aren't rendered, but I'm not sure whether it's related to cosmic-text.)

Screenshot 2023-03-08 at 17 39 40
jackpot51 commented 1 year ago

I believe this is an issue with the image renderer in iced, try the editor-orbclient example.

ales-tsurko commented 1 year ago

It's blurry too:

Screenshot 2023-03-14 at 15 41 14
jackpot51 commented 1 year ago

I'm going to try making a softbuffer example. I believe this is HiDPI scaling on macOS causing the issue and orbclient is not handling that correctly.

VitalyAnkh commented 1 year ago

This also happens on Linux with Gnome on Wayland, with a 2560x1600 display.

Like the image below show, the editor-libcosmic (right side) window's fonts are much blurry than those in firefox (left side).

image

jackpot51 commented 1 year ago

@VitalyAnkh please see if the orbclient example has the same problem on Linux. I believe there are two different issues here:

jackpot51 commented 1 year ago

Fixed in the latest commit, for editor-libcosmic. Not fixed for editor-orbclient on macOS, but I recommend the libcosmic example since it uses native macOS rendering.

VitalyAnkh commented 1 year ago

@jackpot51 Confirmed it's also fixed for editor-libcosmic on Linux with gnome wayland with HiDPI display.

image

And editor-orbclient is still blurry as you said.

image

ales-tsurko commented 1 year ago

Can confirm it's fixed on macOS.

HolgerGottChristensen commented 1 year ago

I seem to still have a problem with some of the text being blurry when running the editor-libcosmic example. I am running on an M1 MacOS 12.4.

The interesting thing is that it seems to only be the text in the editor that is blurry and the rest of the UI is crisp.

Screenshot 2023-07-03 at 21 13 56
VitalyAnkh commented 1 year ago

I experienced the same issue as @HolgerGottChristensen image

VitalyAnkh commented 1 year ago

After bisecting I found the blur issue of editor-libcosmic originates from https://github.com/pop-os/cosmic-text/commit/f6f56a93be8500fe3b43558730c171f08e5ce5d7. This commit just updated the revision of libcosmic, so the real problem in libcosmic is to be investigated :rocket:

ltrook21 commented 2 weeks ago

@VitalyAnkh Do you know if this issue was addressed? I have blurry text in all Chrome based browsers.

mmstick commented 2 weeks ago

@ltrook21 Chrome doesn't use cosmic-text