Documentation: Installing Google Fonts on Linux


This guide provides systematic steps to download and install Google Fonts on a Linux system that are not included by default. This process involves downloading the fonts, extracting them, and moving them to the system fonts directory.
Prerequisites
A Linux system (Ubuntu 20.04 or similar).
Terminal access.
unzip
andfc-cache
tools installed (these can be installed via the package manager if not already present).
Steps
Download the Google Fonts ZIP File
Navigate to the Google Fonts website.
Search for and select the desired font.
Click the download button to get the ZIP file containing the font files.
Extract the ZIP File
Open a terminal.
Navigate to the directory where the ZIP file was downloaded. For example, if the file is in
Downloads
:cd ~/Downloads
Extract the ZIP file using
unzip
:unzip <font-name>.zip -d <font-name>
Replace
<font-name>
with the name of the downloaded ZIP file and extracted folder.
Move the Fonts to the System Directory
Navigate to the extracted folder containing the
.ttf
or.otf
font files:cd <font-name>
Move the font files to the system-wide fonts directory. You will need superuser permissions:
sudo mv *.ttf /usr/share/fonts/ sudo mv *.otf /usr/share/fonts/
If you have different types of font files, adjust the command accordingly.
Update the Font Cache
Refresh the font cache to ensure the new fonts are recognized by the system:
sudo fc-cache -fv
Verify the Installation
Confirm that the fonts are installed correctly:
fc-list | grep <font-name>
Replace
<font-name>
with the name of the font to verify its installation.
Notes
If you prefer to install fonts only for your user account, follow the same steps but move the fonts to
~/.local/share/fonts/
instead of/usr/share/fonts/
. You don’t need superuser permissions in this case.Ensure that the directory structure and font file names are correct when performing the
mv
andunzip
operations.
This guide helps you systematically install Google Fonts on a Linux system, ensuring they are available for use in all applications.
Subscribe to my newsletter
Read articles from Preston Osoro directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
