-
-
Save keeferrourke/d29bf364bd292c78cf774a5c37a791db to your computer and use it in GitHub Desktop.
#!/bin/sh | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.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!" |
make the script executable, then ....
./install-google-fonts.sh
still working fine 11/05/2020
Glad to know it still works 🎉
make the script executable, then ....
./install-google-fonts.sh
still working fine 11/05/2020
still working for me 06/20/2021 on ubuntu 20 04
download ZIP file > unZIP > right click install-google-fonts.sh
> Properties > Permission > select execute : allow executing file as program > close properties > open terminal and run ./install-google-fonts.sh
@keeferrourke, could I make a suggestion to change line 15 to git clone $giturl --depth 1
so that unnecessary git history is not cloned? Makes for a much faster install.
Still working like a charm!
i've create an installer for individual fonts, and for more systems, than just debian: https://github.com/alexmyczko/fnt
This still works really well! The Google Fonts repo seems to be maintained @ https://github.com/google/fonts and this still seems safe to use. Even on 20.04
fonts-cantarell
andfonts-roboto
are still available in universe repos. Thank you for publishing this!If anyone wants a GUI, they can check out
typecatcher
: https://www.omgubuntu.co.uk/2013/08/typecatcher-google-fonts-download-for-ubuntu