cboxdoerfer / fsearch

A fast file search utility for Unix-like systems based on GTK3
GNU General Public License v2.0
3.27k stars 207 forks source link

[BUG] Jagged and broken fonts in Arch Linux Wayland session #471

Closed ChitranshuV closed 1 year ago

ChitranshuV commented 1 year ago

Describe the bug

The UI of fsearch and all the settings have jagged fonts.

To Reproduce Launch fsearch from terminal using fsearch

Expected behavior The fonts should be sharp and clear.

Screenshots Screenshot_20230420_072456

(base) [uncharted@victus-amd ~]$ localectl status
System Locale: LANG=en_US.UTF-8
               LC_TIME=en_GB.UTF-8
               LC_MONETARY=en_IN
               LC_PAPER=en_GB.UTF-8
               LC_NAME=en_GB.UTF-8
               LC_TELEPHONE=en_IN.UTF-8
               LC_MEASUREMENT=en_IN
               LC_IDENTIFICATION=en_GB.UTF-8
    VC Keymap: us
   X11 Layout: us

Additional context Launching fsearch with GTK_USE_PORTAL=0 fixes this somehow. GTK_USE_PORTAL=0 fsearch

image

Can there be a fix that can be pushed so that users don't resort to this kind of hack to get fonts perfect in the application.

UPDATE

I discovered that I had set export GTK_USE_PORTAL=1 in my .bash_profile to force all applications to use the KDE file picker instead of the GTK one. I believe this is what was actually messing with fsearch.

cboxdoerfer commented 1 year ago

FSearch itself doesn't control the font rendering, this is all done by GTK, so there's nothing I can do about that. To me it seems like the GTK-portal implementation (which is forced to be used with GTK_USE_PORTAL=1) fails to talk to the desktop portal of your system and hence doesn't know which theme, font and font settings it's supposed to use. So maybe your desktop portal isn't installed or configured properly. Do you have xdg-desktop-portal-kde installed?

ChitranshuV commented 1 year ago

Yes. I do have xdg-desktop-portal-kde, but I was still not able to use KDE file picker in VS Code and Firefox. The blogs and forums suggested to export GTK_USE_PORTAL=1 to force this behavior. But now it breaks font rendering in all the GTK application; they are very few. The workaround I found is to launch fsearch and similar GTK GUI application with GTK_USE_PORTAL=0 argument. Like this image