Want to install Microsoft fonts, Google web fonts for off-line use, or you just found a favorite font on the web and want to install it in Ubuntu?
Well here’s how to install the font files (.ttf, .ttc) downloaded from web, Google fonts page, or copied from your Windows OS.
Here are 4 font files shown in the picture above. In the steps below I’ll show you how to install and use it in Ubuntu Desktop.
Option 1: Install Fonts for current user only
If you want to install the fonts for current user use only, then simply open up a “Files” (file manager) window, press Ctrl+H to show hidden folder, and navigate to .local/share/fonts (create fonts
sub-folder if not exist).
Next, drag’n’drop your font files into that directory, or a sub-folder of that directory.
Finally, press Ctrl+Alt+T
on keyboard to open terminal, and run command to refresh the cache:
sudo fc-cache -fv
Next, your system configuration tool can find and allow you to apply the fonts
Option 2: Manually install Fonts to system wide use
To install fonts for all users use, do the following steps one by one instead.
1. Launch Terminal from start menu, or by pressing Ctrl+Alt+T on keyboard:
When it opens, paste following commands and run one by one.
2. In Ubuntu Linux, font files are installed to /usr/local/share/fonts or /usr/share/fonts. The former directory is recommended in this case for manual installation.
First create a sub folder in the font directory, ms_fonts
, as example:
sudo mkdir /usr/local/share/fonts/ms_fonts
Type in your password when it asks (no visual feedback) and hit Enter.
3. Move all font files from your Downloads directory to the new created folder:
sudo mv ~/Downloads/*.ttc ~/Downloads/*.ttf /usr/local/share/fonts/ms_fonts/
4. Set permissions to these files by running the commands below one by one:
sudo chown root:staff /usr/local/share/fonts/ms_fonts -R sudo chmod 644 /usr/local/share/fonts/ms_fonts/* -R sudo chmod 755 /usr/local/share/fonts/ms_fonts
5. Finally builds font information caches for apps using fontconfig for their font handling:
sudo fc-cache -fv
Now you can apply new installed fonts via GNOME Tweaks (available in Ubuntu Software / App Center) in default GNOME desktop:
For Chrome browser, go to Settings -> Advanced settings-> Web contents -> Customize fonts.