All text turned to boxes in Ubuntu

There is a quick fix to solve this problem. Login to command prompt by pressing CTRL + ALT + F1 and login into shell.

Reinstalled the Ubuntu fonts with this command:

Then I rebuilt the font information files with this command:

Restart the system and the problem will be resolved.