Home > Debian, Linux, My Works, ubuntu, unix > Installing ttf fonts on Debian or Ubuntu Linux

Installing ttf fonts on Debian or Ubuntu Linux

Here is the simple step to install ttf font on Debian or Ubuntu or debian based linux.

First of all make a font directory to store the fonts. Better use “/usr/share/fonts/ttf”

So make the font directory:

Debian (login as root or use su):

mkdir /usr/share/fonts/ttf

Ubuntu:

sudo mkdir /usr/share/fonts/ttf

If u want to install the ttf font from windows, simple copy them from c:\windows\Fonts

Debian:

mkdir windows
mount /dev/hda1 windows
cd windows/Fonts
cp *.ttf /usr/share/fonts/ttf

Ubuntu:

mkdir windows
sudo mount /dev/hda1 windows
cd windows/Fonts
sudo cp *.ttf /usr/share/fonts/ttf

Now u need to generate the fonts.scale fonts.dir, so u have to install the ttmkfdir and mkfontdir.
Debian:

apt-get install ttmkfdir

cd /usr/share/fonts/ttf
ttmkfdir > fonts.scale
mkfontdir

Ubuntu:

sudo apt-get install ttmkfdir

cd /usr/share/fonts/ttf
sudo ttmkfdir > fonts.scale
sudo mkfontdir

Most of the works finished. U only need to add the font path to xwindows.

Debian:

nano /etc/X11/xorg.conf

Ubuntu:

sudo nano /etc/X11/xorg.conf

then add the fontpath to xorg.conf

FontPath “/usr/share/fonts/ttf”

Now restart ur display manager or total system.
Debian:

/etc/init.d/gdm restart

Ubuntu:

sudo /etc/init.d/gdm restart

If nothing goes wrong, ur done. Congrutulation!!!!!!!!

Views :22980
Categories: Debian, Linux, My Works, ubuntu, unix Tags:
  1. George Harkin
    February 20th, 2007 at 04:54 | #1

    What about this method?

    http://penguinfonts.com/howto/ubuntu.php

    It seems quite a bit easier.

  2. Marty
    March 2nd, 2007 at 11:33 | #2

    Nice instructions.
    I’m running Ubuntu 6.10 and apt couldn’t find “mkfontdir”. But I just skipped it and everything else worked fine.

  3. admin
    May 24th, 2007 at 10:07 | #3

    thanks george , that is easy, but you cann’t create new font dir with that process.

    thanks marty, i fixed it.

  4. Aamod
    July 14th, 2007 at 17:14 | #4

    Thanks, great article. It works as I wanted for me.. All *.ttf now available on my Debian GNU/Linux……..

  5. Devo
    January 17th, 2008 at 01:45 | #5

    Hello!

    This was a very useful tutorial, but too bad it didn’t work for me.

    I did everything as it said and got no errors, but after I restarted my system,
    It set itself to low-graphics mode, which scared me a little, but I fixed that now.
    I Still can’t see the fonts that I should have installed using this method.
    Maybe I need a space between “Font” and “Path”?
    Could anyone help me out?
    Thanks!

    – Devo

  6. January 17th, 2008 at 10:50 | #6

    hi devo.

    i think you made mistake in line
    FontPath “/usr/share/fonts/ttf”

    please don’t copy this line, type it , because of my theme it will place wrong quote.

    please let me if you still getting problem.

    thanks

  7. May 27th, 2008 at 22:11 | #7

    In Ubuntu I made a new folder .fonts and paste the solaymanlipi font over there and it worked.

  8. Jamie
    May 31st, 2008 at 09:47 | #8

    Hi,
    I’ve followed all the steps and the fonts seem to have installed because I can see the correct font when I load a document in OpenOffice, but when I try to select the font in a dropdown list none of the installed fonts are there.

    Also, for some reason now Iceweasel crashes whenever I try to load Google. Nothing else has changed, so I’m wondering if updating the fonts has somehow caused this problem?

    Thanks for any advice

  9. May 31st, 2008 at 12:22 | #9

    jamie, can you please run firefox from terminal, i think then you will get the error message.

    may be some of your fonts have problem for linux. long time back i also faced this problem. and removing that font from the font directory is the solution.

  10. May 31st, 2008 at 12:26 | #10

    @rashed, yes, it will work, but then this font will only for work for this user only. you have to do this same work for all users.

  11. Jamie
    May 31st, 2008 at 13:01 | #11

    Hi lavluda, thanks for the prompt reply. Iceweasel crashes with a “segmentation fault”.

    Do you think the fonts not appearing in the OO.o font list is related to the iceweasel issue, or totally separate?

    Thanks mate

  12. Jamie
    May 31st, 2008 at 14:44 | #12

    UPDATE…
    Your advice about some fonts causing problems in linux made sense because I had originally dumped many fonts into the directory. I went back and cleared them out, and only re-installed the few that I needed.

    This fixed the iceweasel problem, but I still couldn’t see the fonts in OO.o. I found this procedure on the web.

    http://machine-cycle.blogspot.com/2008/01/installing-truetype-fonts-on-debian.html

    I don’t understand the differnece between your tutorial and the procedue from the link above, but it’s all working ok now.

  13. Norman Ramsey
    July 6th, 2008 at 01:25 | #13

    The tutorial at penguinfonts has been shut down. Does anyone hav a copy?

  14. Jedd
    November 18th, 2008 at 22:33 | #14

    You should probably use /usr/local/share/fonts rather than /usr/share/fonts (the latter is managed by the system, the former (/usr/local) is where you’re allowed to do this kind of installation-specific thing).

    Confirm that there are entries in /etc/fonts/fonts.conf – there should be a reference for /usr/local/share/fonts in there already, but it pays to check. Running fc-cache -f after is still required of course.

    If you’re going to install lots of new fonts you can maintain a sensible structure, eg. truetype/ , type1/ , and so on.

  15. Abhishek D
    July 17th, 2012 at 09:51 | #15

    I am looking for hindi fonts for Ubuntu 11.10 following ones

    Chanakya ChanakyaBold Helvetica-Bold
    Helvetica Alankar ChanakyaItalic
    Alankar
    where can I get these I have a Windows7

  1. No trackbacks yet.

%d bloggers like this:
55 queries in 0.419 seconds