focus-editor / focus

A simple and fast text editor
GNU General Public License v3.0
1.81k stars 99 forks source link

Feature request: Disable subpixel antialiasing #428

Closed CELLTH closed 3 weeks ago

CELLTH commented 2 months ago

It would be nice to have the option to disable the subpixel (ClearType/FreeType) anti-aliasing. Even though it looks good in some cases, I prefer to have it off in favor of normal anti-aliasing.

focus-editor commented 2 months ago

I'm curious why you prefer normal anti-aliasing? Are there cases where subpixel isn't strictly better for you?

hstormo commented 1 month ago

I'm curious why you prefer normal anti-aliasing? Are there cases where subpixel isn't strictly better for you?

It has always looked worse than normal AA to me, particularly light text on dark backgrounds.

CELLTH commented 1 month ago

Yeah hinting + ClearType really destroys how the font looks, and in many cases the text color will look off depending on the background color. And since I spend a lot of time in the editor, these things start to get annoying. Even though the effect is small, it's very noticeable. The most awesome thing would be if the user can choose between no, Supersampling/Grayscale, or ClearType anti-aliasing. On top of that, giving the user the option to disable hinting.

Check out Lite-XL editor, they let the user toggle between anti-aliasing modes and toggle the font hinting. It's a cool way to compare and contrast between the different modes.

focus-editor commented 1 month ago

This is getting closer to the top of the list, so should be done soon hopefully.

It has always looked worse than normal AA to me, particularly light text on dark backgrounds.

I bought a new monitor yesterday with HDR support, and I noticed that with HDR on + with different monitor modes the text does indeed look bad. But with no HDR and no enhancement it looks good, more crisp than normal AA would.

focus-editor commented 3 weeks ago

This has just been pushed to main, when the next nightly builds you can download and try it https://ileonte.dev/focus-builds/

To disable hinting or subpixel AA set the following in the [fonts] section:

anti_aliasing: normal  # options: lcd, normal
hinting: false

Adding the option of no anti-aliasing is more work that I'm willing to do right now.

Please close the ticket unless there are issues

CELLTH commented 3 weeks ago

Thanks for adding this in! It's working flawlessly.