I had changed the default Gnome font to Roboto on one of my systems that I am maintaining in my flake for someone else and it had worked for quite some time perfectly. Today, after updating my flake, I saw that the font had jagged edges. I use gnome-tweaks in order to change the fonts. I had the following setup (image taken from my laptop, but was the same on their desktop):
I reset gnome-tweaks to default and had the same problem. Changed fonts, logged out, restarted, rolled back, played with hinting and antialiasing, and continued to try cycling through different options many times to no avail.
These settings should affect GNOME Shell and GTK apps. Maybe some other things as well.
There are also hinting options in the NixOS fontconfig module, which I am not sure how it interact with apps. But that is managed declaratively so it should not change under your nose.
Maybe also check ~/.config/fontconfig and other paths mentioned in Files section of fonts.conf(5) in case something added its own config to your profile.
Thanks for the suggestion @jtojnar, but the resetting commands for gsetting did not work in this case. i also tried some other gsettings commands, but they did not fix the issue. I think @zendo below is correct in this being a hidpi issue. In any other case I bet this would have been the solution.
No success with either. Is this something I can temporarily fix, or is it the much larger issue affecting many unstable Gnome users per your link? And in that case do I just wait for the experts to solve it? Trying to understand as this appears to be bigger than my skill levels with Nix.
I’m also using gnome unstable and my font is super blurry after the recent hidpi pr. However after setting hardware.video.hidpi.enable = false; my font did go back to normal again. Maybe you forget to restart or logout to take effect I think, at least that’s what I did until things go back normal again. I’m also not very happy about the way NixOS dealing with backward compatibility and breaking changes such case. Such breaking change which has profound effect for wide user base should be think carefully before getting merged.
I will try your suggestion again. I did log out, but I’ve noticed I’ve had to do so twice in certain instance for whatever reason. Or maybe a full reboot is needed, I’m not fully sure. Thanks for the advice! Will post back results after I have a chance to rebuild.
I agree, it seems this issue has affected quite a few users. Moving fast is great… until something breaks.
The option definition fonts.optimizeForVeryHighDPI' in /nix/store/…-source/nix/configuration.nix’ no longer has any effect; please remove it.
On unstable it no longer does anything. I solved the fonts problem with config below but I still think it doesn’t look exactly the same as before but I no longer have the older generations so I just might be imagining it.