Ubuntu – Downloading Google Fonts

fontsubuntu-font-family

Is it possible to download all google fonts and have them available under Ubuntu? This would help my webdev.

Best Answer

If you trust webupd8:

cd ~/Downloads && wget http://webupd8.googlecode.com/files/install-google-fonts
chmod +x install-google-fonts
./install-google-fonts

In case anyone need to check without downloading: this is the source code for "install-google-fonts":

$ more install-google-fonts 
# Original author: Michalis Georgiou <mechmg93@gmail.comr>
# Modified by Andrew http://www.webupd8.org <andrew@webupd8.org>

sudo apt-get install mercurial

_hgroot="https://googlefontdirectory.googlecode.com/hg/"
_hgrepo="googlefontdirectory"

echo "Connecting to Mercurial server...."
if [ -d $_hgrepo ] ; then
    cd $_hgrepo
    hg pull -u || return 1
    echo "The local files have been updated."
    cd ..
else
    hg clone $_hgroot $_hgrepo || return 1
fi
echo "Mercurial checkout done or server timeout"
sudo mkdir -p /usr/share/fonts/truetype/google-fonts/
find $PWD/$_hgrepo/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/t
ruetype/google-fonts/ \; || return 1
fc-cache -f > /dev/null
echo "done."
Related Question