focus-editor / focus

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

Font hinting options? #34

Open tinylucid opened 1 year ago

tinylucid commented 1 year ago

Font rendering on Windows sometimes look really bad depending on the size/scale/font. I tried messing with OGL FT code but couldn't achieve desirable results. What I wanted to do is force grayscale hinting, since this hRGB hinting is really strong and noticable on my 4K screen.

Also many fonts look weird in terms of glyph rendering, spacing can be off on certain sizes, on others it's okay. For example using Cascadia Mono you can see weird horizontal glitch in glyph t in the middle of the vertical line. Screenshot 2023-05-08 141135

I assume this comes down to Simp library and FreeType version that it is using so it won't be easy thing to solve I assume.

CookedNick commented 1 year ago

I noticed this too. It's Simp. We'll call this one "Known" but also "Low Priority." The Jai team might even fix it for us eventually.

focus-editor commented 1 year ago

I'll try to add a way to disable subpixel rendering, maybe that'll help, just busy with other things at the moment.

By the way @tinylucid what monitor do you have? Currently only RGB panels are supported.

tinylucid commented 1 year ago

I am using Gigabyte M32U. I've tried to play with different TrueType parameters passed in draw functions in Simp, they mostly produce garbage (but I am not knowlegable about TrueType). Couldn't achieve any result, hence I opened an Issue, maybe someone more skilled, sometimes, will be able to implement this. Thanks anyway! :)

focus-editor commented 1 year ago

Thanks @tinylucid . I couldn't find any specific info on whether Gigabyte M32U uses a non-RGB panel, but we'll check whether disabling subpixel rendering will help when I get to it.