Intro
When I use Arch Linux, I have a problem with font rendering in Firefox and other applications. The font is shown as boxes. This is because the font is not installed or not configured correctly. In this article, I will show you how to fix this problem.
Steps
1. Install Required Fonts
sudo pacman -S noto-fonts noto-fonts-extra noto-fonts-emoji noto-fonts-cjk ttf-dejavu ttf-liberation
ⓘ NOTE:
Althoughnoto-fonts
is installed by default in Arch Linux, it may not be installed in some cases. So, you should install it manually. Andnoto-fonts-extra
,noto-fonts-emoji
, andnoto-fonts-cjk
are also needed to display some special characters. (Tho it’s actually included as a dependency ofnoto-fonts
).ttf-dejavu
andttf-liberation
are also needed to display some characters.
2. Refresh font cache
Pacman has already done this for you, but you can do it manually if you want.
fc-cache -f -v
This command will refresh the font cache. -f
is to force the regeneration of the cache. -v
is to show the progress.
3. Restart Firefox or other applications
After you have done the above steps, you should restart Firefox or other applications to see the changes.
4. (Optional) Change font settings in Firefox
If you still have problems with font rendering in Firefox, you can change the font settings in Firefox.
1. Open Firefox
2. Go to Settings
3. Search for fonts
or just scroll down to the Fonts
section
You can use the Default (DejaVu) or use the Noto fonts.
4. Advanced settings
Make sure you check the Allow pages to choose their own fonts, instead of your selections above
option to let the websites use their own fonts.
Summary
Now you have fixed the font rendering problem in Firefox and other applications on Arch Linux. Here are some before and after screenshots.
Firefox
Discord
I hope this article helps you fix the font rendering problem on Arch Linux. You can also test the font rendering on this website:
References
- Fonts @ ArchWiki
- [SOLVED] Some programs don’t show some fonts @ Arch Linux Forum
- Firefox 57 : fonts not displayed @ Arch Linux Forum
- Some fonts not displaying correctly @ Firefox Support Forum
- Weird boxes showing instead of text in Arch Linux @ Reddit
- Font configuration @ ArchWiki
- An open source font system for everyone @ Google Blog
- Noto: A typeface for the world @ Google Noto Fonts