Font characters displayed as squares in Ubuntu 18.04
Solution 1
I found the solution, was more simple than I thought.
First, you need to update local cache as described here:
rm -rf ~/.cache/fontconfig
sudo fc-cache -r -v
Then, you need to find fontconfig
folder inside snap, since this is the snap version of chromium
.
find ~/snap/chromium/ -name 'fontconfig'
Last, remove this folder inside .cache
:
rm -rf ~/snap/chromium/common/.cache/fontconfig/
Afterwards, chromium
will recreate this folder automatically by using your local updated fontconfig inside ~/.cache/fontconfig
.
Restart chromium
browser to take this effect.
Solution 2
(The previous answer is the better but just a note for future readers)
Another way the problem described above happens is when ~/.config/gtk-3.0/settings.ini
becomes corrupted. Make sure to delete any gtk-font-name
and/or other incomplete lines from that file. Apparently, if GTK fails to parse it, you get the same problem as the screenshot shown above.
Related videos on Youtube
![ioaniatr](https://i.stack.imgur.com/NF7JG.jpg?s=256&g=1)
ioaniatr
Updated on September 18, 2022Comments
-
ioaniatr over 1 year
Recently, on my Ubuntu 18.04 I have noticed that at least on
gnome-calculator
andchromium
browser the fonts are displayed as squares. I have followed instructions here and here, the calculator is fixed, but the problem onchromium
still exists when I open a dialog to search for a file.Not sure if this happens on other applications as well, I haven't checked all my apps, but File managers
nemo
andnautilus
are working fine.Also, before few months ago, I have included some windows fonts for my libre office shown here. I used the copy (
cp
) method, not the link (ln -s
). But, was working fine until yesterday. Haven't done any major change or update, at least on my Linux partition (dual boot). But, I don't think that this has anything to do with that.Any idea how can I fix this issue?
-
vanadium about 4 yearsDoes this answer your question? Only squares instead of letters and numbers are displayed in my calculator and other apps in Ubuntu 18.04
-
ioaniatr about 4 yearsWith this answer the calculator is fixed, but not chromium. Not sure if is only chromium or general issue. I haven't found any other app so far except those two. Also, I don't know what caused this.
-
unhammer about 4 yearsFollowing askubuntu.com/questions/841706/… I tried
rm -rf ~/.cache/fontconfig; sudo fc-cache -r -v; chromium
and it worked. Chromium gave the message[9572:1:0406/185207.504191:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response
on startup. But then the next time I started it, it was broken again :( -
ioaniatr about 4 yearsI just installed the regular version of
chromium-browser
shown here: askubuntu.com/questions/1075103/…. Regular version is working fine, but not the snap version. Firefox, Opera, Chrome are working fine as well. Does this has to do because was the snap version that I had installed? Can I fix the snap version?
-
-
Mitch Talmadge over 3 yearsFixed it for me on Firefox with snap. Thank you!
-
Roland Ewald over 3 yearsAlso works for Opera.
-
Fanta about 3 yearsWorked with Opera, also had to remove (from my home):
snap/opera/common/.cache/fontconfig
snap/opera/115/.config/fontconfig
snap/opera/114/.config/fontconfig
-
John Mansell almost 3 yearsWorks for remmina as well. Replace "chromium" with "remmina" for all commands.
-
Clain Dsilva almost 3 yearsFixed it for my Chromium
-
Manuzziman over 2 yearsFor Opera on Ubuntu 20.04 I also had to do:
sudo rm -rf /var/snap/opera/common/fontconfig
-
Manuzziman over 2 yearsIt worked, but now the problem is back. Do not know why.
-
jorgeca about 2 yearsAlso worked on Ubuntu 20.04, thanks!