Simple steps to install TTF fonts on your Ubuntu Machine
- Move all your fonts to the ~/ Directory. The ~/ Directory is your home folder. So if you were logged in as abhishek, the directory would be /home/abhishek/ . This step is done only to ease the process you can use any directory for this matter.
- 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.
- 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.
- Type in "cd myfonts" . Then type in "sudo cp ~/fontname.ttf ." These will get your font in the /myfonts directory.
- In order to install the font, ownership has to belong to root it would be done automatically as u copied using sudo if its not done use "sudo chown root.root fontname.ttf" and after that "sudo mkfontdir" (this is important)which makes a directory for your font.
- 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" .