pop-os / cosmic-text

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

Are there plans to include gamma blending and stem darkening for rendering? #195

Open kkanungo17 opened 11 months ago

kkanungo17 commented 11 months ago

As described by this freetype article: https://freetype.org/freetype2/docs/hinting/text-rendering-general.html

xalt7x commented 5 months ago

Related to:

kkanungo17 commented 5 months ago

Yes, we finally got a DE with gamma blending for text. Now just waiting on stem darkening.

xalt7x commented 5 months ago

Now just waiting on stem darkening.

I'd like it as well, but unfortunately, on Linux stem darkening might not look good with some OTF fonts. For example, see issues with Noto Sans OTF:

Pop!_OS currently uses OTF versions of Fira fonts.

I hope that either the developers of Freetype, the maintainers of iced, or the maintainers of COSMIC will be able to tweak/fix it somehow.

kkanungo17 commented 5 months ago

I think the problem with those is that the fonts either aren't gamma blended (GTK), or use a value that doesn't match the display (I think Qt uses 1.8 instead of 2.2). I'm just guessing though, let's see what COSMIC devs come up with.

EDIT: Though this does raise the interesting question, what if the display in question doesn't use 2.2?

ryuukk commented 1 month ago

+1, text looks blurry

We also need subpixel rendering