How to Configure and Troubleshoot Fonts in Linux

Users who’ve installed fonts but can’t see them in any of their applications may need to update the font cache so they render properly. There might also be a problem with the installation or even the file that contains the font itself.

More commonly a program might be attempting to render text in a font other than the recently installed one. This is especially a problem with Unicode fonts that cover only a certain block. Most of these errors are easy to fix provided that the font file itself is good and in the right format. Both OTF and TTF files should receive a wide range of support from modern distributions, so read on if you’re having any trouble.

Method 1: Check the Glyphs with gucharmap 

Start the GNOME Character Map by either searching for it on the Dash, opening it from the Applications menu inside of the Accessories menu or clicking on it in the Accessories menu started from the Whisker Menu on Xfce4. Users of KDE might instead want to start KCharSelect, which is the equivalent program in that desktop environment.  Click on the font name box and scroll down to select the font that you’re having difficulties with. If you can see the name, then select it and then select a Unicode Block that would show the type of characters you’re interested in.

Should you select a character set that your font doesn’t have characters for, then the character map might actually show those from a different family of typefaces. Keep this in mind if you’re working with icon fonts or those that display in non-Roman character sets.  Should you be able to see the characters just fine, then double click on several, which will cause them to appear in the “Text to copy:” line at the bottom. Click on the copy button and then paste them into whatever program you wanted them to render in. If they show up fine, then you should have fixed the issue.

If they don’t show up correctly, then highlight them with your mouse by dragging it or by using the Shift key and the cursor keys at the same time. Change the font to the same one you were using in the character map in whichever method is needed in said program. You may need to use a drop-down box in Abiword or LibreOffice. You can perhaps use the Format menu and select font instead to find the font you’re looking for.

Should this have worked, you’ll simply have to remember to change the font whenever you need those specific types of characters from the font in question. This is especially true of icon fonts and various types of dingbat fonts. While it’s easy to think that those fonts have a rendering problem if you’re seeing gibberish, you’re actually looking at the data rendered in a regular font. Fonts that map symbols to alphabetic characters will only show those symbols when the text is set to display in said font. You’ll see seemingly random letters and numbers otherwise.

Method 2: Using fc-cache and fc-list to Update Font Lists 

If you were never able to find the font at all in the first method, then you’ll need to open up a command prompt. Search for the terminal program from the Dash, click on the icon in the System Tools folder of the Applications menu or Whisker menu or hold down Ctrl, Alt and T at the same time. Once you’re at the prompt, you can use fc-cache with no other arguments to update all the fonts on your system. This sometimes works better when as few application programs are open as possible. The fc-cache program won’t return any feedback in most cases.  Check any program that can display fonts to see if your font is now accessible. Some users have reported that it’s best to restart, but that’s almost always unnecessary since fc-cache usually updates it. If you still can’t see it, then try running fc-list | more from your prompt. This should list every font on your system. You’ll need to push the space bar each time you want to see another section of this list. Type fc-list | grep nameoffont, replacing nameoffont with the actual name of the font in question, if you want to further restrict the search.

If you still can’t locate it, then you might have not installed it to the correct directory. Try moving the font to the ~/.fonts directory if it’s not there already. Should you still have problems, then there’s a risk the font file is actually bad.

Method 3: Using fc-validate

Returning to the command line, you’ll need to navigate to the directory that you installed the font in. On many single-user installations, you can accomplish this by using cd ~/.fonts to get into the fonts directory that you have as a home user. If you’re attempting to install fonts on a system-wide basis, then you’ll need to use cd /usr/share/fonts/truetype on many machines to get to the correct location.  Different distributions do this in a slightly different manner, so you might ultimately have used a different location and will have to replace the path with the one you’re using. Once you’re there, try typing fc-validate –verbose nameoffont.ttf, though you’ll have to replace nameoffont.ttf with the font file you’re working with. While the –verbose switch doesn’t usually show much more information, it’s good to include it anyways.

You should receive a statement about whether the font in question satisfies the coverage for your default language. If it doesn’t, then it might be some kind of specialty font. Otherwise, it might actually be damaged and you might need to replace the file. If you’re told it does satisfy it, then you know the font file is at least good.  If you want even more information, then you can try fc-scan nameoffont.ttf | less or fc-scan nameoffont.ttf | more to see a full page of text about the font you’re trying to work with.

Expert Tip

How to Configure and Troubleshoot Fonts in Linux

If the issue is with your Computer or a Laptop you should try using Reimage Plus which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Reimage by clicking the Download button below.

Download Now

I'm not interested

Close