122

I know how to install TrueType fonts (by copying them to /usr/share/fonts/truetype and doing sudo fc-cache -f) but what about OTF formats?

I didn't find a suitable folder to copy them to.

Greenonline
  • 2,081
Behzadsh
  • 3,903

5 Answers5

172

The directory you're looking for is /usr/share/fonts/opentype. If it's not there, you can just create it. Copy your OTF files there; this will install the font for all users. Then, recreate the fonts cache with the command sudo fc-cache -f -v.

You can also install fonts per user at ~/.fonts/. It makes no difference whether they're in any sub-folders or what type they are. Mine, as an example, are organised by foundry.

Alternatively, you can just double click them, this will open them with the Font Viewer, which let's you install them with one click:

alt text

flavio
  • 173
  • 1
  • 9
  • Note: I'm almost certain it doesn't make a difference as long as they are somewhere in /usr/share/fonts/ or ~/.fonts/, but it's a good idea to keep things organised. – Stefano Palazzo Dec 21 '10 at 08:49
  • 4
    If you want to use the font system wide then put your fonts in /usr/share/fonts/opentype – karthick87 Dec 21 '10 at 08:57
  • 21
    Isn't it necessary to update the font cache? sudo fc-cache -f -v – gertvdijk Aug 20 '13 at 14:27
  • 2
    @StefanoPalazzo I may be wrong but there is something missing in your answer: only creating the directory will not install anything ;-) – guntbert Aug 20 '13 at 15:15
  • 2
    In earlier releases I remember that install fonts was quite easy, but now in 14.04 is almost impossible. I try to add one by one fonts with the Font Viewer and it fails to install. I need to add a lot of Adobe Fonts. I was thinking to copy and paste them directly in the directory /usr/share/font/opentype/ but I'm not sure if it works. Should I install first the libotf as @Stefano said? – Aradnix Sep 08 '14 at 15:23
  • 2
    The font previewer doesn't open when double clicking the.otf file. What is that font viewer tool called? – Frederick Nord Jan 06 '15 at 18:04
  • I copied fonts to this folder and absolutely nothing happened. I dont see them in the font viewer, or the unity tweak tool. I'm assuming there's an entire step or steps missing. – Manachi Oct 15 '16 at 09:07
4

Using the standard library on Linux, the OTF fonts don't loads. Must install addictive library based on your system configuration, libotf for example.

Stefano
  • 41
  • 1
  • What do you mean by the "standard" and the "addictive" library? On my system (Ubuntu 22.04), the OTF fonts work just fine without any additional libraries installed. – David Ferenczy Rogožan Jul 07 '23 at 04:07
4

You have to create the folder '/usr/share/fonts/opentype', then add the 'otf' file with the font that you want to include, it works for me!

Maythux
  • 84,289
Marcela
  • 49
1

If you are copying your OTF fonts in ~/.fonts or /usr/share/fonts/opentype remember to replace the spaces in their name with an underscore like

Font Awesome 5 Free-Regular-400.otf --> Font_Awesome_5_Free_Regular_400.otf

It did not work for me if they were not named in this manner I don't know if it was a problem with my system or if it is like this only.

Zanna
  • 70,465
0

Another approach is to convert the OTF font to TTF. There are free online converters where you upload the OTF font files and they are then converted to TTF. You then open with the font viewer and install as per usual. I've just done this and the font installed fine.

fosslinux
  • 3,831