Skip to content

Instantly share code, notes, and snippets.

@dyoungwd
Created November 24, 2016 10:26
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save dyoungwd/aa3ac8dd6241b429a2693f41a65d422f to your computer and use it in GitHub Desktop.
Save dyoungwd/aa3ac8dd6241b429a2693f41a65d422f to your computer and use it in GitHub Desktop.
Install Google Fonts on fedora
# Original : Michalis Georgiou
# Modified : D4zzy for Fedora
_wgeturl="https://github.com/google/fonts/archive/master.tar.gz"
_gf="google-fonts"
# install wget
echo "Installing wget..."
sudo dnf install wget
echo "Connecting to Github server..."
wget $_wgeturl -O $_gf.tar.gz
echo "Extracting the downloaded archive..."
tar -xf $_gf.tar.gz
echo "Creating the /usr/share/fonts/truetype/$_gf folder"
sudo mkdir -p /usr/share/fonts/truetype/$_gf
echo "Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf"
find $PWD/fonts-master/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || return 1
echo "Updating the font cache"
fc-cache -f > /dev/null
# clean up, but only the .tar.gz, the user may need the folder
rm -f $_gf.tar.gz
echo "Job Done - enjoy your fonts..."
@haidarvm
Copy link

haidarvm commented Dec 16, 2020

thanks hope it's work for RHEL 8.3. And yes it's work fast

@dyoungwd
Copy link
Author

Glad u found iit useful :

thanks hope it's work for RHEL 8.3. And yes it's work fast

Glad you found it useful

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