Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pelligrag/7f2bfee85eeb43fd2534bf29b3ca5f2c to your computer and use it in GitHub Desktop.
Save pelligrag/7f2bfee85eeb43fd2534bf29b3ca5f2c to your computer and use it in GitHub Desktop.

Revisions

  1. @keeferrourke keeferrourke revised this gist May 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-google-fonts.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    # 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
    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"
  2. @keeferrourke keeferrourke revised this gist May 31, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-google-fonts.sh
    Original file line number Diff line number Diff line change
    @@ -19,8 +19,8 @@ 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-*.tff" -delete \;
    sudo find $pkgdir -type f -name "Ubuntu-*.tff" -delete \;
    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
  3. @keeferrourke keeferrourke created this gist Jul 19, 2016.
    31 changes: 31 additions & 0 deletions install-google-fonts.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    #!/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-*.tff" -delete \;
    sudo find $pkgdir -type f -name "Ubuntu-*.tff" -delete \;

    # provides roboto
    sudo apt-get --purge remove fonts-roboto

    echo "Updating font-cache..."
    sudo fc-cache -f > /dev/null

    echo "Done!"