Missing fonts after moving /usr/share

Posted by daniel on 12 April, 2015
Category Linux

My Ubuntu installation was accusing low space at /usr. It was a 15GB partition and nevertheless it had about 600MB free.

As I had overestimated the size of /var, I decided to reduce it (using gparted) and create another partition for /usr/share, which would give me about 6GB of free space at /usr.

Everything worked as a charm. I went about my normal day and, after a few hours of normal work, I moved to a different task. I am teaching a class and had not uploaded the slides for the students. So, I opened the presentation on Impress (Libre-Office's "Powerpoint") and most of the text was gone. I still had pictures, the titles were there, but the actual content was gone.

I pulled back some backups, nothing. Then, after a cup of coffee to clear my mind, I realized that it could be related to the changes I had done in my file system. Trying to understand better what happened, I looked at the slides again. I noticed that the missing text were using specific fonts. For example, I used courier for code snippets, and in the one single case I forgot, the code was there. Now, guess where the fonts are stored? yes: /usr/share/fonts. Everything started to make sense.

So, after poking around, I found that there is a cache of fonts and I concluded that moving /usr/shareto another partition, I messed with the cache. So, I rebuilt it and.. voi-la! It works.

If you come across a similar problem, the command to rebuild that cache is as follows:

sudo fc-cache -f -v

 

Comments (95)