Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
# Written by: Keefer Rourke <>
# Based on AUR package <>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git
mkdir $srcdir
cd $srcdir
echo "Cloning Git repository..."
git clone $giturl
echo "Installing fonts..."
sudo mkdir -p $pkgdir
sudo find $srcdir -type f -name "*.ttf" -exec install -Dm644 {} $pkgdir \;
echo "Cleaning up..."
sudo find $pkgdir -type f -name "Cantarell-*.ttf" -delete \;
sudo find $pkgdir -type f -name "Ubuntu-*.ttf" -delete \;
# provides roboto
sudo apt-get --purge remove fonts-roboto
echo "Updating font-cache..."
sudo fc-cache -f > /dev/null
echo "Done!"
Copy link

hugoaboud commented Oct 4, 2021

Still working like a charm!

Copy link

alexmyczko commented Dec 3, 2021

i've create an installer for individual fonts, and for more systems, than just debian:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment