400

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

myusuf3
  • 34,189

15 Answers15

455

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.

Aaron Hall
  • 1,059
  • 2
  • 13
  • 22
jbowtie
  • 13,195
  • 29
    Instead of ~/.fonts, it's also possible to place fonts in ~/.local/share/fonts. – Remco Haszing Mar 27 '16 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 '16 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. – Christian Hujer Jan 19 '17 at 05: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 06 '17 at 14:15
  • 2
    Note that if you want to install mscorefonts you need to manually download this package https://packages.debian.org/en/sid/all/ttf-mscorefonts-installer/download since the version in the Ubuntu repositories is broken. – Aaron Franke May 08 '17 at 08:13
  • And where are fonts in Gnome Software? I cannot find them. Ubuntu Software center was discontinued. – Suncatcher May 20 '18 at 14:01
  • 1
    Not all font paths are supported (auto-loaded) equally by applications. In my experience /usr/share/fonts/ is the most reliable place. – totymedli Apr 17 '20 at 06:05
  • apt has ttf-mscorefonts-installer – mmann1123 Dec 28 '22 at 12:08
  • If the font file is not being picked up by fc-cache, it may be because the file is zipped, even if the file ending is for a font such as .ttf. You can verify that the file is a font file and not a zip file with file your-file.ttf. If it is showing as a zip file, it can be unzipped with unzip your-file.ttf – Edward Moffett Jan 04 '23 at 11:06
96

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.

einpoklum
  • 871
  • 3
  • 10
  • 28
frabjous
  • 6,431
  • 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 '13 at 16:16
  • You can use type sudo mv <original file path> /usr/local/share/fonts into the terminal to copy/paste it. – LuminousNutria Mar 18 '20 at 13:49
  • There are some graphical programs you can install to make this easier: Well, let's hear them. – Melab May 04 '21 at 16:34
60

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.

Marco Ceppi
  • 48,101
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.)

bobince
  • 895
14

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
  • 2
    This tool is interesting but slow and very basic. You still need to obtain font files manually in order to install fonts. – Aaron Franke May 08 '17 at 08: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

Li Wan
  • 3
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.

nhandler
  • 2,516
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.

dv3500ea
  • 37,204
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.

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.

carnendil
  • 5,451
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).

JanC
  • 19,422
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.

Pablo Bianchi
  • 15,657
Keerthi
  • 11
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
secavfr
  • 221
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