Text becomes a bunch of missing characters

After restarting after installing a software update from the Software Updater, i now get this everytime i have to select an image to open in Discord:


However, the one that appears whenever i upload an image in ubuntu-mate.community, it's not broken:
Any idea on how to fix this problem on Discord?
I also use default font settings, if that helps.

Hi @qwertyuiopasdfghjklz, whooaaa, i got something like this some days back. I was thinking that it's because of some issues related to the config after re-installation of my computer.
I done sudo apt update & sudo apt upgrade, since then, the issue went away.
I'm surprised to see that you have this exact issue than I got. it was probably a bug on apps running this file selection window from a app running with snap.

1 Like

My Discord client runs from Snap. Tried the two commands (sudo apt update & sudo apt upgrade), i'll restart now.

Still same problem :c

With evolution -> regular caja window that uses my theme
With google-chrome installed via a .deb -> regular caja window that uses my theme
With chromium-browser installed with a snap -> gray window (looking more gnome than ubuntu mate) but the strange chars are not there anymore.

Can you give a try with a other software installed by snap ?
Maybe some snaps updated by themselves and the issue got fixed for me, not yet for you :slight_smile:

The funky "gray window" with weird glyphs in place of text is Adwaita (GNOME and GTK's default theme), with no icon set other than the builtin icons in GTK (hence the sidebar has icons but not the buttons on the bottom of the dialog), without a font (hence the blocky "placeholder" glyphs).

This would tend to indicate to me that the app from the Snap is being blocked from reading at least those files pertaining to the font, the icon set and the theme.

Is the rest of the Discord client in disarray like that? Any clue if it's a Qt application? Interestingly Qt applications often can appear with GTK file dialogs but themselves are not themed to look like GTK. I'm out of guesses right now otherwise.

EDIT:
Ohhh! No wonder! Discord is an "app" based around Chrome!

AFAIK, Chrome doesn't follow your GTK theme (except for Open dialogs and stuff like that), the app seems to provide its own fonts (so there's no need for the external fonts GTK needs), and Chrome uses no GTK icons, so it's really no wonder that somebody could make a slip-up like that and forget to test the minor GTK-using part of the app. But the idea of a slip-up is just speculation on my part.

@qwertyuiopasdfghjklz, I had exact problem with discord snap just few days back. The 'solution' was provided in the snapcraft.io forum. Well, it is not actually a solution but workaround. I don't fully get their explanations but the gist is we have to clear and recreate the fontcache. Try the following,

Close discord (completely by hitting 'Quit Discord' on tray-icon). Then run,

rm ~/snap/discord/common/.cache/fontconfig/*
rm ~/.cache/fontconfig/*
sudo rm /var/cache/fontconfig/*

Start the application and it should be OK now. That worked for me. YMMV.

Still same problem even after system restart. :c

Even after clearing fontcache as above? If you search snapcraft forums there is no other solution (so far) other than what I mentioned. It worked for me. I don't know if your configuration is any different but I would suggest to try the above procedure one more time. May be also sudo snap refresh. Other than that, I'm out of ideas.

Yes, i did all three commands as root on the terminal. I'll also now try sudo snap refresh.
EDIT: After typing in the terminal sudo snap refresh it shows: All snaps up to date.

The first two are supposed to be run as your regular user. Those fontcache are from your home folder. Only the last one (inside /var/cache) should be run with root privileges and hence usage of sudo.

first command says: rm: cannot remove '/home/kevinpaolozero/snap/discord/common/.cache/fontconfig/*': No such file or directory
EDIT: command worked
EDIT: now did all three but it still does not work :c

@qwertyuiopasdfghjklz I'm out of ideas. If you check the snapcraft forum one can see lot of people are affected by this issue with those commands provided as workaround which, quiet frankly, users should not be having to run; it's apps responsibility. Anyways, sorry couldn't be of much help. You can check in snapcraft forum so you may get more help.

Okay, thank you for trying to help.

OK one last attempt before I give up. :grinning:

I checked my history again and noticed I missed a command fc-cache -r. So, the full set of commands is as below.

rm ~/snap/discord/common/.cache/fontconfig/*
rm ~/.cache/fontconfig/*
sudo rm /var/cache/fontconfig/*
fc-cache -r

Hope this would fix your issue. But then it may not. :sweat_smile: Here is the link to the snapcraft forum thread that discusses missing characters in snap apps. Many report the workaround works, many say it doesn't. Fortunately for me it worked.

Hi folks,
Downloading UM 21.04 to give some try today !
The issue looks to be back xD

My friend ! I gave a try to your commands, it worked !

1 Like

Not working. I'll try the .deb version of Discord instead.
Edit: the .deb version works well