# The Ubuntu Forum Community > Other Discussion and Support > Art & Design >  How to install fonts in Ubuntu?

## Aleksandersen

Hi,

I have a .ttf font file here and I am wondering how I install it into the system?

----------


## mssever

This is one of the best-kept secrets in Ubuntu. Open up Nautilus, hit Ctrl+L, and type fonts://<Enter>.

It's possible that you'll need a root nautilus for this: 

```
gksudo nautilus
```

----------


## Aleksandersen

Well, I cannot seam to be able to copy the font over! Not even as root.

----------


## eg-maverick

when I do this, it looks like it is going to copy (I have a server that has thousands of TTF). it asks for a password and a window pops up saying that it is preparing to copy. Then when I enter the password, the windows disappear happily but the font does not appear in the font directory. Any ideas?
Thanks.

----------


## mssever

I wrote a script a while back that installs fonts. Save the script somewhere in your $PATH and make it executable. Type 

```
sudo mkdir -p /usr/share/fonts/truetype/font-install
```

  Then, cd to the directory that the fonts you want to install are in, run the script from a terminal window, and follow the prompts. Remember that Linux is case-sensitive, so if some files have a ttf extension and some hava a TTF extension, you'll either need to rename them or run the script twice.



```
#!/bin/bash
#
# This script helps to install fonts
#
# Set your default font storage directory here
##DEFAULT_DIR="$HOME/fonts"
DEFAULT_DIR=`pwd`
# Set the default font installation directory here
DEFAULT_DEST="/usr/share/fonts/truetype/font-install"


# Don't edit anything below unless you know what you're doing.

echo "In which directory are the fonts?"
echo -n "[$DEFAULT_DIR] "
read DIR

echo
echo "What is the extention (without the dot) of the fonts?"
echo -n "[ttf] "
read EXT

echo
echo "Where should the fonts be installed?"
echo "DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!"
echo -n "[$DEFAULT_DEST] "
read DEST

if [ -z "$DIR" ]; then
    DIR="$DEFAULT_DIR"
fi

if [ -z "$EXT" ]; then
    EXT="ttf"
fi

if [ -z "$DEST" ]; then
    DEST="$DEFAULT_DEST"
fi

sudo -v
if [ $? != 0 ]; then
    echo "Unable to obtain the necessary privileges. Exiting..."
    echo -n "Press <Enter> to continue. "
    read WER
    exit $?
fi

echo
echo

if [ ! -d "$DIR" ]; then
    echo "Directory $DIR does not exist. Exiting..."
    echo -n "Press <Enter> to continue. "
    read SDF
    exit 2
fi

if [ ! -d "$DEST" ]; then
    echo "Directory $DEST does not exist. Exiting..."
    echo -n "Press <Enter> to continue. "
    read DFG
    exit 1
fi

echo "Copying fonts..."
cd "$DIR"

for i in *."$EXT"; do
    sudo cp -iv "$i" "$DEST"
done

echo
echo
echo "Updating the font cache..."
sudo fc-cache -fv

if [ $? != 0 ]; then
    echo "Error updating the font cache. Your fonts haven't been completely installed. Try running sudo fc-cache -fv manually. Exiting..."
    echo -n "Press <Enter> to continue."
    read FSF
    exit $?
fi

echo
echo
echo "Finished."
echo
echo "You will probably need to restart running programs to use the new fonts."
echo -n "Press <Enter> to exit. "
read WERT
exit 0
```

----------


## eg-maverick

thanks for the script. 
before i do damage to myself, what is the correct DEFAULT_DIR? I have standard dapper 6.06. I assume it is /home/'myusrname'/fonts . Is that correct?
thanks, Craig

----------


## eg-maverick

That did it! Thanks so much!

----------


## mssever

> thanks for the script. 
> before i do damage to myself, what is the correct DEFAULT_DIR? I have standard dapper 6.06. I assume it is /home/'myusrname'/fonts . Is that correct?
> thanks, Craig


This script is set up for Dapper. $DEFAULT_DIR can be anything you want. It defaults to the current directory. So, if you cd to the directory containing the fonts you want to install and run the script, everything should be OK.

$DEFAULT_DEST is the only distro-specific location. Technically, it can be any directory inside /usr/share/fonts/truetype (or it might be even more flexible--I haven't tried that), but I think that it's neater to put locally-installed fonts in a directory of their own.

----------


## emiphiste

I tried using the script, and it looked like it copied the fonts over fine; however, when I opened the GIMP to make sure I had the fonts, they were all defaulted to look like one of the monotypes. This may or may not be a unique issue - just thought I'd let you know (though the most likely reason is that I'm doing something wrong).

After some research on ubuntuforums.org, I've located a really simple way to install fonts (just to add on to the thread in case you're only looking to install maybe a few fonts at a time).

1) Download any/all fonts into one location (I'm using /home/"USERNAME"/ttffonts).

2) Navigate back to your home directory and create a folder called ".fonts". (This directory will disappear from view; don't worry about it, it's still there.)

3) In terminal, cd to /home/"USERNAME"/ttffonts.

4) cp all fonts in ttffonts to /home/"USERNAME"/.fonts (The only minor inconvenience about this is that, unlike using the script, you have to type out all fonts by hand - which may suck quite heartily if you're trying to install thousands of fonts from a server.)

5) Installation complete! (Source: http://ubuntuforums.org/showthread.php?t=263689)


(By the way, if you can help me get the script to work 100%, that would be awesome. It looks to be a very handy and well-written tool. I thought it might be because I'm using Breezy Badger instead of Dapper - could that be the culprit?)

----------


## eg-maverick

> I tried using the script, and it looked like it copied the fonts over fine; however, when I opened the GIMP to make sure I had the fonts, they were all defaulted to look like one of the monotypes. This may or may not be a unique issue - just thought I'd let you know (though the most likely reason is that I'm doing something wrong).
> 
> After some research on ubuntuforums.org, I've located a really simple way to install fonts (just to add on to the thread in case you're only looking to install maybe a few fonts at a time).
> 
> 1) Download any/all fonts into one location (I'm using /home/"USERNAME"/ttffonts).
> 
> 2) Navigate back to your home directory and create a folder called ".fonts". (This directory will disappear from view; don't worry about it, it's still there.)
> 
> 3) In terminal, cd to /home/"USERNAME"/ttffonts.
> ...



I wonder if using Nautilus would work for item 4. then you wouldn't have to type everyting out.

----------


## Hilko

Thanks ! These fonts are really great. And easy to install, just click the .deb package that's all.

----------


## shameedp

> I wonder if using Nautilus would work for item 4. then you wouldn't have to type everyting out.


Thanks for the post dude


It really works

----------


## 0per4t0r

Thanks for this, now I can use my favorite font in GIMP!

----------


## alfalfa31

Dude, this script rocks.  Thank you very much for sharing it...

----------


## Hozza

"fontmatrix" is really good and you dont need to mess around with terminal  :Smile:

----------


## Ian Clark

> Make a directory for your fonts in /usr/share/fonts/truetype: 
> 
> ```
> sudo mkdir -p /usr/share/fonts/truetype/my_fonts
> ```
> 
> Copy your fonts to that directory:
> 
> ```
> ...


This would work for fonts that only have one .ttf file in the folder, but for others like this one or this one, there are fonts that don't get installed.  Any suggestions?

----------


## Ian Clark

> "fontmatrix" is really good and you dont need to mess around with terminal


Fontmatrix can see the fonts that were mentioned in the last post, but enabling them still doesn't get OOO, Abiword or Gimp to see them.

----------


## ishmael2k

> I take it nobody reads any of my posts with the link in my signature saying how to install fonts?
> http://www.geocities.com/ajb2k305/tutorials/font.html


I did, worked like charm. Very easy, pulled all my fonts from old pc and copied them to new folder. Open Office never knew what hit her.  :LOL:

----------


## labinnsw

> I wrote a script a while back that installs fonts. Save the script somewhere in your $PATH and make it executable. Type 
> 
> ```
> sudo mkdir -p /usr/share/fonts/truetype/font-install
> ```
> 
>   Then, cd to the directory that the fonts you want to install are in, run the script from a terminal window, and follow the prompts. Remember that Linux is case-sensitive, so if some files have a ttf extension and some hava a TTF extension, you'll either need to rename them or run the script twice.
> 
> 
> ...


Useful even today. Too easy!!! (just remember: case sensitive)

----------


## russu52

> I did the .fonts directory approach, just copied fonts in there and they are installed, nothing else to do. 
> 
> Works nice.


brilliant!!! never figured out that it was so easy! thanks!!

----------


## Catarina

> I tried using the script, and it looked like it copied the fonts over fine; however, when I opened the GIMP to make sure I had the fonts, they were all defaulted to look like one of the monotypes. This may or may not be a unique issue - just thought I'd let you know (though the most likely reason is that I'm doing something wrong).
> 
> After some research on ubuntuforums.org, I've located a really simple way to install fonts (just to add on to the thread in case you're only looking to install maybe a few fonts at a time).
> 
> 1) Download any/all fonts into one location (I'm using /home/"USERNAME"/ttffonts).
> 
> 2) Navigate back to your home directory and create a folder called ".fonts". (This directory will disappear from view; don't worry about it, it's still there.)
> 
> 3) In terminal, cd to /home/"USERNAME"/ttffonts.
> ...


Well, I just ended up using this method, after trying both the gksudo nautilus command and the script by mssever.

Even though there are easier ways, especially when hadling multiple files, I found this one rather simple, though since I'm still a green user, I had some difficulties working it out at first (probably one of the reasons for my nautilus/script issue) but then I saw there were missing some really basic stuff.

In this example, I set /home/user/Documents as the original font location.



```
user@user-desktop:~$ sudo su
root@user-desktop:/home/user# cd /home/user/Documents
root@user-desktop:/home/user/Documents# cp /home/user/.fonts Font-Name.ttf
cp: folder omit `/home/user/.fonts'
root@user-desktop:/home/user/Documents# sudo fc-cache -fv
```

Notes: "user" should be your current session's username, "user-desktop" should be your computer's name and "/home/user/Documents" should have "Documents" replaced by the name of the folder containing the fonts to install.

Hope this turns out to be useful for someone in the future  :Wink:

----------


## mssever

> Well, I just ended up using this method, after trying both the gksudo nautilus command and the script by mssever.
> 
> Even though there are easier ways, especially when hadling multiple files, I found this one rather simple, though since I'm still a green user, I had some difficulties working it out at first (probably one of the reasons for my nautilus/script issue) but then I saw there were missing some really basic stuff.
> 
> In this example, I set /home/user/Documents as the original font location.


I've cleaned up your script:


```
$: sudo su # Omit this command. You should only use sudo when you need to be root. (In other words, try doing it first as a normal user.)
#: cd /home/user/Documents # Or, cd ~/Documents (or ~user/Documents if you want another user's home)
#: cp /home/user/.fonts Font-Name.ttf # This is backwards, hence the message below from cp.
cp: folder omit `/home/user/.fonts'
#: cp *.{ttf,TTF} ~/.fonts #Use this instead. You can modify the wildcard as appropriate.
#: sudo fc-cache -fv # Because of the first sudo, this sudo is unnecessary.
```

----------


## stephy123

thinking of trying the solution.only one successful in getting it all right.anyone else?let me try it myself...lets see

----------


## AJB2K3

> thinking of trying the solution.only one successful in getting it all right.anyone else?let me try it myself...lets see


Try the link in my sig.

----------


## wirespot

People. What is all this about shell scripts and whatnot? It's very simple to add fonts to Ubuntu:

1. Copy your TTF files to ~/.fonts (create the dir if it doesn't exist). Yes, that's .fonts, with a dot.

2. Open a console and run *fc-cache -fv ~/.fonts*

That's ALL.

Long explanation:

Font handling in modern Linux systems is delegated to the "fontconfig" package. It's what gives you fc-cache. The system settings are in /etc/fonts but you're better off not touching that. You have a ~/.fonts.conf files which you can tweak (but be warned that System>Preferences>Appearance>Fonts will override it, so write-protect it if you customize it).

A simple tweak would be to add a <dir>~/multimedia/myfonts</dir> line inside the <fontconfig></fontconfig> block. Or several such entries. It helps if you want to keep you fonts organized in individual dirs. But I for one am perfectly happy throwing them all in ~/.fonts.

Hope this helps.

----------


## Nephiel

I just installed a bunch of ttf fonts by copying them in a folder inside /usr/share/fonts/ (to make them available to all users), gave them the proper permissions and ownership, and ran fc-cache -fv. The fonts installed fine and are available to OpenOffice and other apps.

But for some weird reason, the default system font has changed to "Segoe Print", one of the fonts I installed.

When any app tries to display a font and it's not available in my system, it falls back to displaying "Segoe Print".

 When I run OpenOffice Writer, the default font for a new document is now "Segoe Print" as well. I changed this to Arial through Tools->Options->OOoWriter->Basic Fonts, and after a restart, I went there again and clicked the "Default" button, sure enough, the default was again "Segoe Print".

Uninstalling "Segoe Print" simply sets the next one, "Segoe Script", as default.

I'm not running Gnome nor gnome-settings-daemon (I use Fluxbox) but the default Gnome UI font is set to Arial. The GTK theme is set to Arial as well.

I've already checked all the fontconfig files (/etc/fonts/fonts.conf and local.conf). I have no ~/.fonts.conf file.

Might be related to this bug: https://bugs.launchpad.net/ubuntu/+bug/125949

Is there some other way to set the default fallback font?

----------


## davyman913

> People. What is all this about shell scripts and whatnot? It's very simple to add fonts to Ubuntu:
> 
> 1. Copy your TTF files to ~/.fonts (create the dir if it doesn't exist). Yes, that's .fonts, with a dot.
> 
> 2. Open a console and run *fc-cache -fv ~/.fonts*


I just ran this in terminal step by step and got it to copy and everything, I run fc-cache and it appears to find the files and succeed to do whatever it does. But the fonts are still unavailable to GIMP and OpenOffice. Can anyone help me out? I didn't do anything with permissions, but I don't have any clue what I would need to change with those to get it working.

----------


## smr1lk

I also had this issue. But I found an easy way out. Do the following steps.

1. copy all new founts to a folder (any folder name)
2. use the command line terminal to go to the folder.
3. within the folder type this:
       chmod 644 *.*
4.go to an existing folder like "thai" as follows:
      cd /usr/share/fonts/truetype/thai
5. then copy the new fonst to this folder.
     cp  /replace with your full folder path/*.* .

NOTE: DO NOT IGNORE THE LAST DOT IN THE ABOVE COMMAND.

THAT'S IT. OPEN THE WORD PROCESSOR. THE FONTS ARE THERE. :Smile:

----------


## Exodist

> Hi,
> 
> I have a .ttf font file here and I am wondering how I install it into the system?


In  you home folder just make a folder called .fonts and drop them in there. That simple.

----------


## sharma567

You can still drag and drop to install fonts using a different folder: .fonts in your home folder. This folder may not exist by default. Open your home folder in the file browser, and select View->Show Hidden Files. If you canât find the .fonts folder, create it.
 You can copy any TTF font file into this folder and it will become available immediately to applications after they are restarted. You can get TTF fonts from the Internet, or even a Windows system.
____________________________________________
business opportunity directory humor blog

----------


## akolahi

Yep that worked for me  :Smile: 

Not all fonts are showing up in OpenOffice, but i think that's another issue.




> You can still drag and drop to install fonts using a different folder: .fonts in your home folder. This folder may not exist by default. Open your home folder in the file browser, and select View->Show Hidden Files. If you canât find the .fonts folder, create it.
>  You can copy any TTF font file into this folder and it will become available immediately to applications after they are restarted. You can get TTF fonts from the Internet, or even a Windows system.
> ____________________________________________
> business opportunity directory humor blog

----------


## AJB2K3

Is my tutorial not of use anymore?
I sure I've explained it as well as I can.
http://www.ajb2k3.co.uk/tutorials/font.html

Arg never finished the system wide section.

----------


## alex.rayu

How to install fonts? You must be kidding! Select the fonts, right click - and there will be a bold-faced "Install Fonts" menu item. Everything for a user! Oh drats, I forgot, that's in Windows!

----------


## Merk42

> How to install fonts? You must be kidding! Select the fonts, right click - and there will be a bold-faced "Install Fonts" menu item. Everything for a user! Oh drats, I forgot, that's in Windows!


*Thank God* font installation is finally self explanatory in Karmic
Double Click (opens up a preview) then click "install"

----------


## alex.rayu

God has nothing to do with it. He had his chance to insert that function all that time. But he didn't. Thanks to the developers!

----------


## Joe Casadonte

Hi,

Running 9.10, just tried the "Install Font" from the Font Viewer and the fonts fail to show up in OO.  Also, the .fonts & fc-cache -fv method didn't work, either.   :Sad:

----------


## Exodist

> Hi,
> 
> Running 9.10, just tried the "Install Font" from the Font Viewer and the fonts fail to show up in OO.  Also, the .fonts & fc-cache -fv method didn't work, either.


In your home folder, like mine is /home/exodist, you will have a .fonts folder. Just like that ".fonts". From the the entire directory will look like this /home/exodist/.fonts

If you put your true type fonts in the .fonts folder, they will show up. You may have to log out and back in just in case there is a bug, but they will work. Make sure its .fonts, not .Fonts or .font or .FONTS. Only .fonts

Cheers,
Exo

----------


## alex.rayu

Yeah if you have 300 fonts to install - opening each of them in a preview and clicking an Install button does not make one with thanking God for it. It is great to have a button there. BUT, a context Install menu item in a context menu is a MUST.

----------


## Joe Casadonte

> You may have to log out and back in just in case there is a bug, but they will work.


Indeed, that was it. -- thanks!

----------


## Exodist

> Indeed, that was it. -- thanks!


Not a problem. When making gnome themes, now and then I have to log out and log back in for GNOME to update from the theme code. Then sometimes it doesn't, its just quirky from time to time.

----------


## AlexanderDGreat

I don't know if there's anything wrong with my method, can you please comment on it? Tried on 3 Karmic computers and 2 Jaunty, works well! I'm using a .ttf fonts.

NOTE: I have a MS Office 2007. I just went to C:\Windows\Fonts\ and got all the .ttf fonts there.

1. To browse your system files with root permissions



```
sudo nautilus
```

2. Create a folder *myfonts* under:




> /usr/share/fonts/


Copy & Paste your fonts in your newly created folder:

3. Make sure you set permissions to:



```
sudo chmod -R 755 /usr/share/fonts/myfonts/
```

4. Finally, restart your fonts



```
sudo fc-cache -fv
```

5. If you're curious:



```
man fc-cache
```

6. Open OOP - and fonts like cambria, calibri, etc... will be there...

----------


## blackhawkover

I was having same prob as some, clicking on the preview and pushing install, which changed the button to install failed. So, I opened /home in root and went to .fonts and that font was there, double clicked and clicked install and it worked. I'm not sure if it will work in openoffice without logging out or something, but we are closer. 

thanks for the tip.

----------


## mssever

> I was having same prob as some, clicking on the preview and pushing install, which changed the button to install failed. So, I opened /home in root and went to .fonts and that font was there, double clicked and clicked install and it worked. I'm not sure if it will work in openoffice without logging out or something, but we are closer. 
> 
> thanks for the tip.


Editing stuff in your home directory as root is virtually always unnecessary if your system is properly configured. Files under your home dir should be owned by your user, and of course your user has control over the files it owns.

Messing about as root can leave root-owned files around, which can cause various problems. Save root for only system-level stuff.

----------


## Allwynd

i personally got interested in the Diablo II Lord of Destruction font, so i easily found it and downloaded it and i wanted to install it but didnt know how, so i searched around the forum a bit, the first responce didnt work, maybe i was doing it wrong
then i opened the font with something like font viewer similar to the one in *******.. and there was a button [Install] .. the font was .ttf
now i have the font ^_^
i hope this helps out someone

----------


## airtonix

> Yeah if you have 300 fonts to install - opening each of them in a preview and clicking an Install button does not make one with thanking God for it. It is great to have a button there. BUT, a context Install menu item in a context menu is a MUST.


You mean copy & paste is too hard? 

1. select font(s)
2. press ctrl + c
3. press ctrl + l
4. type ~/.fonts
5. press ctrl + v

----------


## dfwsupergeek

I see that this is a VERY old thread, but I just wanted to say that the install script worked like a dream in Karmic, so Thanks!  :Smile:

----------


## trixa_13

> Hi,
> 
> I have a .ttf font file here and I am wondering how I install it into the system?



You just have to double-click it and it will open a new window. At the right of the window, there is an option, "Install Font". Click on it and it will install the font. You can see it in your Home Folder but first, you have to select "Show Hidden Files" on View Menu and double-click the folder, ".fonts". And voila! The font is installed! :KDE Star:

----------


## Jimmy Goal

For me it worked: under Ubuntu 9.10 default distro


create folder "/home/USERNAME/.fonts"
copied all the font files to that folder
typed "sudo fc-cache fv" in terminal

It was done    :Very Happy: 

Thanks all

----------


## Bloodsmith

Heeeyyyy, first post, awesome.
Does any of this translate over to Kubuntu? And if so, anyone know where I may be able to find extra fonts to download? If possible, from a trusted source. Thanks!

----------


## LaurenJadeTaylor

Hi friends this is the way to install fonts in ubuntu:- 



This section describes two ways for how to install new fonts in Ubuntu. 



The first uses the Synaptic Package Manager to install fonts from the Ubuntu repositories. As new fonts get added to the archive, this method offers fonts suitable for an increasing number of users, and is very easy. 



The second method is useful if you have downloaded fonts from the web, bought them, or acquired them from other sources. It is a bit more manual, but allows you to use fonts (including restricted fonts when you can't find a free/libre/open font equivalent) from a wide range of sources. 



Finally, at the end of this page, there are some links for further information on fonts on GNU/Linux.

----------


## adzidzor

> For me it worked: under Ubuntu 9.10 default distro
> 
> 
> create folder "/home/USERNAME/.fonts"
> copied all the font files to that folder
> typed "sudo fc-cache fv" in terminal
> 
> It was done   
> 
> Thanks all



Worked perfectly for me in Lucid! Thanks

----------


## Davidmark

1
*Move all your fonts to the ~/ Directory*. The ~/ Directory is your home folder. So if you were logged in as cruddpuppet, the directory would be /home/cruddpuppet/ .2
*Open up the terminal*. I'm assuming you've already extracted the font to the ~/ directory. Type: "cd /usr/local/share/fonts/truetype" without the quotes (the path is "/usr/share/fonts/truetype" on some distros). What this does is changes the directory to the truetype fonts directory.3
*Type in "sudo mkdir myfonts" also without quotes*. Assuming you're not logged in as root, this will ask you for your password. Anything you type will not be seen, but it is there. Just type in your password, press enter, and the directory 'myfonts' will be created.4
*Type in "cd myfonts"* . Then type in "sudo cp ~/fontname.ttf ." . These will get your font in the /myfonts directory.5
*In order to install the font, ownership has to belong to root, so type in "sudo chown root*.root fontname.ttf" and after that "sudo mkfontdir" which makes a directory for your font.6
*Now your font is installed, but it will disappear the next time ubuntu starts up, so you just need to type "cd* .." and after that "fc-cache" .

----------


## .Daniel

Likewise, this definitely works in Lucid Linux - thanks very much  :Very Happy: 

'create folder "/home/USERNAME/.fonts"
copied all the font files to that folder
typed "sudo fc-cache fv" in terminal'

----------


## cadaverousmob

> Likewise, this definitely works in Lucid Linux - thanks very much 
> 
> 'create folder "/home/USERNAME/.fonts"
> copied all the font files to that folder
> typed "sudo fc-cache fv" in terminal'


+1

Go Lucid!

----------


## mssever

> *Move all your fonts to the ~/ Directory*. The ~/ Directory is your home folder. So if you were logged in as cruddpuppet, the directory would be /home/cruddpuppet/


These instructions are a difficult way to operate. Unless you only have one font to install, it'll be awkward to dump the fonts in your home directory. Just skip this step and leave your fonts wherever they are now. But if you put all your fonts in a single directory which contains only fonts, your life will be easier if you have a large number of fonts to install.



> *Open up the terminal*. I'm assuming you've already extracted the font to the ~/ directory. Type: "cd /usr/local/share/fonts/truetype" without the quotes (the path is "/usr/share/fonts/truetype" on some distros). What this does is changes the directory to the truetype fonts directory.


Open up a terminal. Skip everything else here; it's a waste of time.



> *Type in "sudo mkdir myfonts" also without quotes*. Assuming you're not logged in as root, this will ask you for your password. Anything you type will not be seen, but it is there. Just type in your password, press enter, and the directory 'myfonts' will be created.


Try this command instead: 

```
sudo mkdir -p /usr/local/share/fonts/truetype/myfonts
```

We didn't need to cd earlier because we can just as easily make the directory from wherever we are. And remember to use the tab key to autocomplete directory names and speed along. The -p argument to mkdir tells mkdir to create any additional directories that may be necessary. It's probably unnecessary in this case, but it doesn't hurt.




> *Type in "cd myfonts"* . Then type in "sudo cp ~/fontname.ttf ." . These will get your font in the /myfonts directory.


Assuming you put your fonts in ~/fonts (adjust this as necessary for your situation) and that there are only fonts in tht directory, type 

```
sudo cp ~/fonts/* /usr/local/share/fonts/truetype/myfonts
```




> *In order to install the font, ownership has to belong to root, so type in "sudo chown root*.root fontname.ttf" and after that "sudo mkfontdir" which makes a directory for your font.


This step is unnecessary. You used sudo with your cp command, so of course the files you copied are already owned by root. Also, the mkfontdir command is unnecessary unless you're using old .pcf, .snf, or .bdf fonts. Chances are, you're not.



> *Now your font is installed, but it will disappear the next time ubuntu starts up, so you just need to type "cd* .." and after that "fc-cache" .


Actually, the font isn't installed yet. Just type 

```
sudo fc-cache -fv
```

 and you're good to go, with no worries about rebooting.

----------


## AlexanderDGreat

@mssever - You mentioned to put your fonts in this folder:



```
/usr/local/share/fonts/truetype/myfonts
```

BUT... I put mine in:



```
/usr/share/fonts/myfonts
```

notice, it's not in LOCAL, nor in TRUETYPE folders - Is this OK? What's the difference? Yet my fonts are working great, is that normal?

*PS Anyone tried to rename a FONT for example, sudo mv cambria.ttf cam.ttf - and notice it doesn't work after that, even after restart?*

Try it on OPENOFFICE or A CSS file.

----------


## mssever

> @mssever - You mentioned to put your fonts in this folder:
> 
> 
> 
> ```
> /usr/local/share/fonts/truetype/myfonts
> ```
> 
> BUT... I put mine in:
> ...


I don't know exactly, but often there are several possible places where you can put fonts. /usr/local is traditionally for stuff you add yourself while /usr is for stuff that's part of the distro.




> *PS Anyone tried to rename a FONT for example, sudo mv cambria.ttf cam.ttf - and notice it doesn't work after that, even after restart?*
> 
> Try it on OPENOFFICE or A CSS file.


Apparently for some reason fonts require that they have a certain filename.

----------


## Girideepa

Dear All,
thanks for nice tutorial,
simply copied ttf fonts to .font folder,
that's it,

----------


## apacheuk

This maybe just me... I don't normally haven bother with the command line stuff

just right click on a .ttf file (where ever I've downloaded it to) and click "open with font viewer". Once that happens there is an "install" button in the bottom right.

Have only checked this with .ttf files, but seems to work.

----------


## shivertone

*How to Install Fonts on Ubuntu*


*       Running a few simple commands helps you to install fonts in Ubuntu.    * 


The different ways of installing Fonts on Ubuntuare described below.*
*

 Installing fonts for single use Installing fonts for systemwide use Installing Microsoft Windows Fonts (eg Times New Roman)*
*

*Installing fonts for single use*
    1) Using *kfontview*
 

 An easy way to install fonts is using *kfontview.* Run the command given from command line. 
 Go to *Applications* > *Accessories* > *Terminal*

 
 
 Run the command
 *apt-get install kcontrol*
 

 After the installation process is completed, run command $kfontview.
 *kfontview*

 From the *kfontview* window, open the font you have downloaded.
 Click on the "Install" button
 NOTICE: You will probably need to resize the window to see the "Install" button which is in the lower right hand corner.
 Click on the "*Personal*" button
    2) By hand
 
 If a font doesn't exist create it. First create a font's directory
 *mkdir ~/.fonts*

To copy font from command line
*cp [font file] ~/.fonts*

To copy all fonts from myfonts folder 

 *fc-cache -f -v ~/.fonts*

 *Installing fonts for systemwide use*

 Make a root directory
*mkdir /usr/share/fonts/truetype/myfonts*

 Copy the font(s) into the newly created directory
 *cp [fonts] /usr/share/fonts/truetype/myfonts*

 To Run
 *fc-cache -f -v
*
*Installing Microsoft Windows Fonts (eg Times New Roman)*

 Make sure you have the "universe"  repository added. If not, as root, modify your /etc/apt/sources.list and  uncomment the deb line which will look something like this
        deb http://us.archive.ubuntu.com/ubuntu dapper universe
 
 Updata apt-get
 *apt-get update*

 To Install run the following
 *apt-get install msttcorefonts*

----------


## monet.hart

it worked for me too.  Thanks

----------


## commodianus

> Hi,
> 
> I have a .ttf font file here and I am wondering how I install it into the system?


1. If you don't have it, create /home/*user*/.fonts (*user* being your username).



```
mkdir ~/.fonts
```

2. Extract the fonts to that directory.

2.a Alternatively use nautilus (check View>Show Hidden Files or hit ctrl+H) and copy / paste them in (as .fonts is a hidden directory).

2.b Alternatively copy the fonts using the terminal:

cp /path/to/font.tff /home/*<user>*/.fonts

3. Profit.

----------


## syed.rakib.al.hasan

> 1. If you don't have it, create /home/*user*/.fonts (*user* being your username).
> 
> 
> 
> ```
> mkdir ~/.fonts
> ```
> 
> 2. Extract the fonts to that directory.
> ...



Awesome.......... simply awesome....... i like using method 2.

----------


## baditaflorin

> *How to Install Fonts on Ubuntu*
> 
> 
> *       Running a few simple commands helps you to install fonts in Ubuntu.    * 
> 
> 
> The different ways of installing Fonts on Ubuntuare described below.*
> *
> 
> ...


In ubuntu 10.10 



```
sudo apt-get install kcontrol
[sudo] password for badita: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package kcontrol is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  kdelibs4c2a kdebase-runtime kdebase-workspace-bin

E: Package 'kcontrol' has no installation candidate
badita@badita-P35-Platinum-MS-7345:~$
```

----------


## flitbee

> I tried using the script, and it looked like it copied the fonts over fine; however, when I opened the GIMP to make sure I had the fonts, they were all defaulted to look like one of the monotypes. This may or may not be a unique issue - just thought I'd let you know (though the most likely reason is that I'm doing something wrong).
> 
> After some research on ubuntuforums.org, I've located a really simple way to install fonts (just to add on to the thread in case you're only looking to install maybe a few fonts at a time).
> 
> 1) Download any/all fonts into one location (I'm using /home/"USERNAME"/ttffonts).
> 
> 2) Navigate back to your home directory and create a folder called ".fonts". (This directory will disappear from view; don't worry about it, it's still there.)
> 
> 3) In terminal, cd to /home/"USERNAME"/ttffonts.
> ...


This is the most easiest method I've found so far! Thank you..

----------


## MrGreenTea

Thanks. After read all the messages, I figure out that all you need is:
1. create a folder
2.dump all your fonts in it
3.right click the folder, rename it to .fonts
4.right click it again, cut
5.go to /home/user/ and paste it.

At least it worked for me. You can try

----------


## prokoudine

> Thanks. After read all the messages, I figure out that all you need is:
> 1. create a folder
> 2.dump all your fonts in it
> 3.right click the folder, rename it to .fonts
> 4.right click it again, cut
> 5.go to /home/user/ and paste it.
> 
> At least it worked for me. You can try


I wonder why people go through pains like this when there are tools like Fontmatrix to manage fonts collections.

----------


## ganeshbhatbams

"gksudo nautilus" worked nicely in ubuntu 9.10 i copied file easily
thank you
Dr.ganesh :Popcorn:

----------


## Copper Bezel

> I wonder why people go through pains like this when there are tools like Fontmatrix to manage fonts collections.


Pains like putting the files you downloaded into a _different folder_? I just don't understand why anyone would feel the need to use the terminal.

I'm disturbed at the possibility that there might be anything simpler than drag and drop.

----------


## PTZ

There is a real simple way of installing a font (10.04) - 

1.  Open the folder containing the font.
2.  Right-click the font file.
3.  Select "Open with Font Viewer" from the menu.
4.  Click the INSTALL FONT button in the lower right corner of Font Viewer.

----------


## psnegi

The simplest way is download the font you want to install. Double click on it. At the right bottom corner you will see the option 'install font'. Click on it and it will be installed. You can check in Open Office word and it will be there. (Ubuntu 10.1)

----------


## AlexanderDGreat

Hi, I'm so confused when assigning fonts to my design because there are A LOT OF FONTS, out there!

Example when I type in OpenOffice, use GIMP, I'm overwhelmed with the LOTS of fonts out there, even when I was still in Windows.

Is there a tutorial where I can:

1. Remove All Pre-Installed Fonts?
2. Create or paste only the ones I want in /home/user/.fonts? or /usr/share/fonts/myfonts/ ?

If I can do this, I'll be faster and can only CHOOSE FONTS I Actually USE and NEED.

Thanks a lot.

----------


## rvchari

> Hi,
> 
> I have a .ttf font file here and I am wondering how I install it into the system?


i usually take the straight steps...
i download all the ttf i need. then copy to ~/.fonts folder in hme or if you need systemwide application, move the *.ttf fonts to /usr/share/fonts/TTF
if TTF folder isnt there then create one.



```
sudo mv ~/FONTS.ttf /usr/share/fonts/TTF
```

if TTF folder isnt there in /usr/share/fonts, then create...



```
sudo mkdir /usr/share/fonts/TTF
```

----------


## prokoudine

> Pains like putting the files you downloaded into a _different folder_?


Pains like having to manually manage fonts collection instead of using perfectly reasonable interfaces with tags and whatnot.




> Hi, I'm so confused when assigning fonts to my design because there are A LOT OF FONTS, out there!
> 
> Example when I type in OpenOffice, use GIMP, I'm overwhelmed with the LOTS of fonts out there, even when I was still in Windows.


Use font managers. They make it easy to decide what you don't need that can be hidden for while. I'll see about a tutorial.

----------


## swiftarrow

Hi people,

If, like most, you are on a single-user system, then font installation is dead simple.

Of course, there are a billion different ways (read above) but here's my favourite:

create a directory called 

```
.fonts
```

 in your home directory.
Put your new fonts in that
run 

```
sudo fc-cache -fv
```

That's it! :Guitar:

----------


## AJLChase

I'm using ubuntu 11.04 and am trying all of the different ways to install fonts into existing and new folders, but a lot of these folders im finding that after i make them it won't allow me to modify or change permissions to install anything into them. Getting kind of frustrated as I would just assume it would be pretty straight forward. When I use GIMP 2.6 to select a font I keep getting Invalid UTF-8 data in file '/home/ajlchase/.font/BROKEN_GHOST.ttf no matter which way I locate it....help this noob out please!

----------


## Rhys L

Hi I'm a noob too but to have the max permissions i would open a terminal window then at eh prompt type 

sudo nautilus 

This opens a file browser as root i think that should give you whatever permissions you want

----------


## w.saharut

> I tried using the script, and it looked like it copied the fonts over fine; however, when I opened the GIMP to make sure I had the fonts, they were all defaulted to look like one of the monotypes. This may or may not be a unique issue - just thought I'd let you know (though the most likely reason is that I'm doing something wrong).
> 
> After some research on ubuntuforums.org, I've located a really simple way to install fonts (just to add on to the thread in case you're only looking to install maybe a few fonts at a time).
> 
> 1) Download any/all fonts into one location (I'm using /home/"USERNAME"/ttffonts).
> 
> 2) Navigate back to your home directory and create a folder called ".fonts". (This directory will disappear from view; don't worry about it, it's still there.)
> 
> 3) In terminal, cd to /home/"USERNAME"/ttffonts.
> ...




it's work 100%. i ever have problem in fonts format between ms office and ununtu.
but now it's ok.
Thank so much.

----------


## monsterzero

> The simplest way is download the font you want to install. Double click on it. At the right bottom corner you will see the option 'install font'. Click on it and it will be installed. You can check in Open Office word and it will be there. (Ubuntu 10.1)


This worked great for me and it took about five seconds.  Thank you!

(Running Ubuntu 10.04)

----------


## robot_chicken_parm

the easiest way to install a new font is to download the font file of your choice, from for example http://www.fontcenter.com/fonts/zero_threes.html.  Font Center has a lot of goodies, and that particular one, zero threes, is one of my favs.  With this particular site, or any for that matter, it doesnt matter if it says the font is for mac or pc, as it is a *.TTF file anyway.  Download the file, open it.  Without even extracting it, from within the zip program, just open the tff file.  It will show an example of the file and a button that says install.  It is that simple.  Enjoy!

----------


## xtremo

Thanks for the tip.....been puzzled on this for a while!

----------


## nowashburn

I know this is an old thread, but it was the first one that came up when searching. Anyhow, my 2 cents..

I have three machines, 2 running 12.10 and one running 12.04. No matter what when clicking on the font and selecting "Install Font" in font viewer, I get the Install Failed message. Instead I have to copy the font to the .fonts directory manually. Not a huge deal but kind of annoying and well, there does seem to be an issue here because if not, it wouldn't fail. 

What is the purpose of the install font option in font viewer if it doesn't seem to work for so many people?

----------


## GreatDanton

Simplicity I believe. I prefer installing fonts via terminal anyway.

----------


## legendbb

Came up with this thread when trying to add fonts to Ubuntu 10.10

Found a quick summary quick concise and complete: http://www.wikihow.com/Install-TrueType-Fonts-on-Ubuntu

Just one point to add, please do make sure minimum user has read access to your newly added fonts.

And try to avoid using font viewer's "install fonts" button, because it install fonts to ~/.fonts/ can be good for yourself, but confuse others at later time.

Thanks for all efforts.

----------


## matega

> I wonder if using Nautilus would work for item 4. then you wouldn't have to type everyting out.


Yes, it would. '.fonts' is a hidden directory, all you have to do is tell Nautilus you want to view hidden files as well. Either do it in the settings or press Ctrl-H (H as Hidden). It works in pretty much any file manager, not just Nautilus. Once you get to see the directory, simply copy the fonts into it. They will only be available to the current user though.

----------


## Random20210831

*1st way:*
1) Open Terminal *(Ctrl + Alt + T)*
2) *(for root privilegies)*

```
sudo su -
```

3) *(for nautilus start)* 

```
nautilus
```

4) Find font archive and extract it in */usr/share/fonts/truetype/*

*NOTE: Don't extract fonts in /home/user/.fonts or /root/.fonts. For system-wide (for all in system) installation extract it in /usr/share/fonts/truetype/.*

*2nd way:*
1) Open nautilus
2) Double-click on desired font archive
3) That will open Font Manager
4) Simple click on "Install" button

That's all!  :Very Happy:

----------

