Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip
sudo chmod -R --reference=/usr/share/fonts/opentype /usr/share/fonts/googlefonts

Register fonts

sudo fc-cache -fv

Check if font installed

fc-match OpenSans

Bibliography

http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux
http://ubuntuhandbook.org/index.php/2016/05/manually-install-fonts-ubuntu-16-04

@mikealche

This comment has been minimized.

Copy link

@mikealche mikealche commented Nov 8, 2017

Amazing thanks! Just remember you need to cd into googlefonts before unzipping!
Best regards!

@monners

This comment has been minimized.

Copy link

@monners monners commented Dec 13, 2017

Thanks!
you might wanna update your gist to point to the download url, rather than the reference page, and specify the name of the file you expect, otherwise you'll get query string junk (for open sans that'd be: wget -O Open_Sans.zip https://fonts.google.com/download?family=Open%20Sans)

@andersonid

This comment has been minimized.

Copy link

@andersonid andersonid commented Jan 20, 2018

great... thanks

@wweedd

This comment has been minimized.

Copy link

@wweedd wweedd commented Mar 12, 2018

Really helpful

@speeddragon

This comment has been minimized.

Copy link

@speeddragon speeddragon commented Apr 23, 2018

Very useful!

@amoghkalyanshetti

This comment has been minimized.

Copy link

@amoghkalyanshetti amoghkalyanshetti commented Jul 11, 2018

Thank you very much !

@tarjei

This comment has been minimized.

Copy link

@tarjei tarjei commented Jul 31, 2018

Thanks for this!
The install part is better written as:

cd /usr/share/fonts 
sudo mkdir googlefonts
sudo unzip -d . ~/Downloads/fonts.zip 
sudo chmod -R --reference=opentype googlefonts
@tarjei

This comment has been minimized.

Copy link

@tarjei tarjei commented Jul 31, 2018

You can also install some of the fonts as packages on newer ubuntu (I'm on 18.04):
sudo apt install fonts-lato fonts-open-sans fonts-roboto fonts-mononoki

@lightonphiri

This comment has been minimized.

Copy link
Owner Author

@lightonphiri lightonphiri commented Nov 3, 2018

Thanks for this!
The install part is better written as:

cd /usr/share/fonts 
sudo mkdir googlefonts
sudo unzip -d . ~/Downloads/fonts.zip 
sudo chmod -R --reference=opentype googlefonts

Thanks. Reformatted gist [...]

@adityatelange

This comment has been minimized.

Copy link

@adityatelange adityatelange commented Jan 13, 2019

if you want google_product_sans =>

https://forum.xda-developers.com/attachment.php?attachmentid=4324851&d=1509979469 and copy
Font_ProductSans2/system/fonts/ to /usr/share/fonts/googlefonts

@Bhanuchander210

This comment has been minimized.

Copy link

@Bhanuchander210 Bhanuchander210 commented Jun 8, 2019

I have used typecatcher. i think, worth to mention here.

@dhirajpatra

This comment has been minimized.

Copy link

@dhirajpatra dhirajpatra commented Feb 19, 2020

Very nice thanks

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