400

How do I install fonts on Ubuntu Linux? I need them to be available in gimp.

15 Answers 15

453

Many fonts are packaged for Ubuntu and available via the "Fonts" category of the Ubuntu Software Center. If you prefer apt-get, search for packages starting with otf- or ttf-.

Font files that are placed in the hidden .fonts directory of your home folder will automatically be available (but /etc/fonts/fonts.conf indicates it will be removed soon.). You can also place them in the ~/.local/share/fonts directory on newer versions of Ubuntu per the comments below.

You can also double-click on the font file (or select Open with Font Viewer in the right-click menu). Then click the Install Font button.

If you need the fonts to be available system-wide, you'll need to copy them to /usr/local/share/fonts and reboot (or manually rebuild the font cache with fc-cache -f -v).

You can confirm they are installed correctly by running fc-list | grep "<name-of-font>"

You may need to restart some programs, like OpenOffice Writer, before they actually show the new fonts (usually such programs are caching the font list when they start up).

Edit: Changed advice to manually install into /usr/local/share/fonts instead of /usr/share/fonts to reflect comments and best practice.

9
  • 29
    Instead of ~/.fonts, it's also possible to place fonts in ~/.local/share/fonts. Mar 27, 2016 at 10:28
  • 2
    This is no longer true in 16.10. You have to do it through Synaptic or another package installer.
    – James
    Aug 16, 2016 at 20:37
  • 10
    Manually modifying /usr/share/fonts feels wrong to me. I think manually installed system-wide fonts should go to /usr/local/share/fonts. Jan 19, 2017 at 5:45
  • 3
    fc-cache comes with the package fontconfig on latest Ubuntu server versions, so don't forget your apt-get install fontconfig if your system cannot find fc-cache And yes, fc-cache also scans /usr/local/share/fonts, so placing them there would be more respectful of Linux filesystem hierarchy.
    – ywarnier
    Apr 6, 2017 at 14:15
  • 2
    Note that if you want to install mscorefonts you need to manually download this package packages.debian.org/en/sid/all/ttf-mscorefonts-installer/… since the version in the Ubuntu repositories is broken. May 8, 2017 at 8:13
95

Copy the fonts to /usr/local/share/fonts or a subfolder (such as /usr/local/share/fonts/TTF) and then run sudo fc-cache -fv. There are some graphical programs you can install to make this easier, but I've never felt the need to try any of them. The Ubuntu wiki page on Fonts here may be of help too.

GIMP will find them in there then.

3
  • 5
    you have to paste them as root (in /usr/share/fonts or any subfolder of that path), so in order to do so I use gksu nautilus and access the path as root.
    – user123492
    Nov 15, 2013 at 16:16
  • You can use type sudo mv <original file path> /usr/local/share/fonts into the terminal to copy/paste it. Mar 18, 2020 at 13:49
  • There are some graphical programs you can install to make this easier: Well, let's hear them.
    – Melab
    May 4, 2021 at 16:34
59

Installation of fonts from 3rd party websites is almost too easy. Download and save the file somewhere to your computer:

Font File

Then double click the font to load the font interface:

Font Selection

Select the Install Font button located at the bottom right of the screen.

4
  • 1
    Is works and is easy to use, but it can be slow with large font folders, and if you have to install multiple fonts opening 50 windows is annoying when you can just copy the fonts to the fonts directory and update the font cache - but this does works fine when installing a few new fonts. Sort of relevant on speed and terminal v gui.
    – Wilf
    Feb 4, 2015 at 17:31
  • 5
    It is gnome-font-viewer. right?
    – Pandya
    Apr 16, 2015 at 11:43
  • 1
    @Pandya Yes, it is
    – Dinei
    Aug 15, 2017 at 14:52
  • So what Happens behind the scene, when you click "Install Font"? OK. I figured out. It is installed under ~/.fonts/
    – Jarl
    Nov 19, 2018 at 7:30
18

You don't have to install as root. Create a folder called .fonts in your home directory (if you don't already have one), drop the font file in there, run Gimp, job done.

(You may have to enable Edit->Preferences->Views->Show hidden and backup files in Nautilus to be able to see .fonts and other ‘hidden’ folders in your home, if you haven't already.)

3
  • 4
    You do not need to run Gimp to activate fonts. Copying font files to ~/.fonts and running fc-cache -fv is enough. Apr 6, 2016 at 12:50
  • 2
    Gimp was mentioned here because the question specifically mentioned wanting to use the new font in gimp
    – Zoey Hewll
    Dec 30, 2017 at 5:45
  • If you want see the hidden folders in home directory, just hit Ctrl + H and press it again hide the folders.
    – Shashanth
    Jun 30, 2019 at 6:48
13

Font Manager

Application for Install and Manage fonts.

Can install Multiple Fonts.

To install fonts Click on Manage Fonts Button and select Install Fonts Option.

enter image description here

Font Manager can be installed from apps.ubuntu.com or and with Software Centre. If with commandline ;

sudo apt-get install font-manager
1
  • 2
    This tool is interesting but slow and very basic. You still need to obtain font files manually in order to install fonts. May 8, 2017 at 8:21
12

If you install font(s) in folder .fonts in your home directory (another directory $HOME/.local/share/fonts in ubuntu 18.04 is ok) , you may need to run fc-cache -rv (not sudo) in order to cache fonts in your home directory as well.

fc-cache -rv

0
7

Installing font is just copying its file to specific directory.

There can be different directories on different systems. For example at my system they are:

  • /usr/share/fonts/ — fonts for all users
  • ~/.local/share/fonts/ — fonts for particular user

There can be any subdirectories you want. It may help you to organize your font collection.

Here is the command to get list of font files that your system uses.

fc-list -f '%{file}\n' | sort

Look at it and you'll get the idea of where fonts are located in your system.

5

There is also an application called fontmatrix that can help install and manage fonts on Ubuntu. To quote the introduction on the website:

Fontmatrix is a real Linux font manager, available on any platform and as well for KDE (which already had Kfontinstaller) as for Gnome. It's purpose is to recursively query the fonts (ttf, ps & otf) in the directories you give it to search, sort them quickly, (avoiding bugged or broken ones) and show them. Then, you can tag them, sub-tag, re-sort according various tags, preview... Even create a pdf Font Book...

Fontmatrix screenshot

Fontmatrix has been available to install from the Ubuntu universe repository since jaunty, and version 0.6.0+svn20100107-2ubuntu2 is currently in maverick and natty. A brief explanation about using fontmatrix is available on their website.

3
  • FontMatrix isn't exactly a "script"... ;-)
    – JanC
    Oct 16, 2010 at 17:51
  • I guess it is a bit more complex than what most post people would consider a script. I have gone ahead and edited the answer to refer to it as an application instead.
    – nhandler
    Oct 16, 2010 at 18:26
  • 5
    Answer has become outdated, this tool is no longer available in Ubuntu 16.04 LTS May 8, 2017 at 8:16
3

Also, there are lots of fonts available as software packages. Font packages are named in the form ttf-* or otf-*. It is better to install fonts as packages instead of manually if possible. You can use tools such as Synaptic, apt-get or the Ubuntu Software Centre. The Software Centre has a dedicated fonts section.

1
  • And where are fonts in Gnome Software? I cannot find them. Ubuntu Software center was discontinued.
    – Suncatcher
    May 20, 2018 at 14:00
2

In addition to manually installing them inside ~.fonts (see bobince's answer) and FontMatrix (what nhandler shows you), there is also another font manager aptly named Font Manager (install Ubuntu package for 10.10, or download package for 10.04 and maybe older versions) that is quite lightweight (and has a Gtk GUI).

1
  • Does this tool allows automatic installing or I should search for font packages manually?
    – Suncatcher
    May 20, 2018 at 14:08
2

If you want to have fonts available exclusively to Gimp, see this answer.

In a nutshell, you copy the fonts files to Gimp's own font folder, or tell Gimp where you have the folder(s) with your fonts.

2

Another question, about installing Google Fonts, was closed as a duplicate of this one, though it isn't really (being rather narrow).

A better answer than the one provided there (i.e. to go to Google Fonts and look up the font and go through their weird downloading system) is to get it directly from Github, e.g.: Roboto Mono font files

The rest of them are available at https://github.com/google/fonts/tree/master/apache, and there's also a ZIP file of them available from the main https://github.com/google/fonts#readme page.

So, if you want to script this stuff (e.g. regularly download the latest version), you can do it with a Git checkout, or by using wget or curl to pull down the exact files you want.

PS: There's another duplicate question at "Downloading Google Fonts". It details some other methods, like using an installer script from googlecode.com and (for more than the Google Fonts) using tasksel.

1

This method worked for me in Ubuntu 18.04 Bionic Beaver.

  1. Download the file containing the desired fonts.
  2. Go the directory where the downloaded file is.
  3. Right click on the file. A black "Box" will appear with many commands.
  4. Select "OPEN WITH FONTS." Right click on it.
  5. Another box'll appear. You'll see a green "INSTALL" button at the top right corner.
  6. Click on that and the fonts will get installed.

You can go into the fonts directory or use a program like LibreOffice to verify the installed fonts.

1

If you are ever using Windows WSL2, you can link your Windows fonts to Ubuntu's ones.

ln -s /mnt/c/Windows/Fonts ~/.local/share/fonts
0

I think the best way is to use gfinstall script, install it and you just say gfinstall whicheverFont and it will install it, you can also specify it to install locally (for the current user) or globally for all users

Edit: I made this script so that I don't have to download, copy and paste fonts each time

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .