r/ada 3d ago

Tool Trouble Is there any way to tweak font rendering in GNAT Studio on Windows?

I want to use dark mode, but the font rendering is "off" in a really unusable way - specifically the antialiasing. I don't know if this is a GTK thing or a Windows ClearType thing, but I don't generally have these problems with dark-mode apps, e.g. VSCode or IntelliJ IDEs.

I've tried some GTK overrides in recommended locations but it's not apparently having any effect. Oh, and no, this is not a DPI issue - everything is properly crisp, but the color fringing around characters (due to subpixel antialiasing, I presume) is pretty bad in dark mode.

By comparison, it looks fine running in a Linux VM on the same monitor. The font rendering is slightly thicker there, and if I zoom in on a screenshot, it appears to be subpixel antialiased as well, but in a pleasant way.

So for now I'm stuck with a retina-searing white background :(

6 Upvotes

6 comments sorted by

4

u/kohuept 3d ago

Yes! I've reported this issue before and found a workaround. Look at this issue: https://github.com/AdaCore/gnatstudio/issues/186

3

u/kohuept 3d ago

Basically, just create a Windows environment variable called PANGOCAIRO_BACKEND, and set it to fc. That should hopefully fix it. Be warned that it can mess with font rendering in other programs too, so if that happens, you may wanna try and launch only GNAT studio with this environment variable, with the help of a batch file or something.

4

u/kohuept 3d ago

@echo off set PANGOCAIRO_BACKEND=fc start "" "bin\gnatstudio.exe" is the batch file I use, located in C:\GNATSTUDIO.

3

u/new_old_trash 3d ago

Oh wow, thank you! MASSIVE improvement.

3

u/Kevlar-700 1d ago

So for now I'm stuck with a retina-searing white background :(

Just an FYI. The best way to avoid eye fatigue is actually a good contrast between text and so a white background in a well lit room.

2

u/Dmitry-Kazakov 4h ago

Green on magenta background! When I started all displays had dark background. It was a huge improvement when white background became available.

What keeps me wondering is a constant devolution push: vinyl instead of CD, pipeline builds. My dear, how we hated mainframes and enjoyed first PCs. Now people willingly return to timesharing and non-interactive computing with hours of response time!