Upgraded from Ubuntu 11.10 to 12.04. With 11.10, I had broken fonts. I hoped to get rid of these broken fonts with 12.04 but problem has worsened. Any solution?
2 Answers
I had some problems with the code in (2), here's my edited version:
sudo su
then
dpkg -l | awk -F" " '/ttf-/ {print $2} /fonts-/ {print $2}' | while read line; do apt-get purge -y $line && apt-get install $line -y; done
(added the -y)
Your font cache is probably messed up. Try clearing it.
To do the same, switch to tty1 using Ctrl+Alt+F1 and run:
$ sudo pkill -9 lightdm # or whatever your desktop manager is
$ rm ~/.fontconfig/*
$ sudo rm /var/cache/fontconfig/*
You may want to reinstall font-packages fonts-*
and ttf-*
at this point:
$ sudo dpkg -l | awk -F" " '/ttf-/ {print $2} /fonts-/ {print $2}' | while read line; do apt-get purge -y $line && apt-get install $line -y; done
Finally, hit Ctrl+Alt+Del to reboot.
-
For some reason running the
dpkg
command removed all fonts but did not reinstall them and I was left with all fonts missing on my system. Aug 8, 2018 at 12:54