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!!!!!!!!
number of view: 1958Popularity: 27% [?]
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
I am S. M. Ibrahim lavlu aka lavluda working as web application developer, SEO, server security and optimization, apps scaling consultant from dhaka, bangladesh. On my free time i like to pass my time for opensource projects.




What about this method?
http://penguinfonts.com/howto/ubuntu.php
It seems quite a bit easier.
[Reply]
Nice instructions.
I’m running Ubuntu 6.10 and apt couldn’t find “mkfontdir”. But I just skipped it and everything else worked fine.
[Reply]
thanks george , that is easy, but you cann’t create new font dir with that process.
thanks marty, i fixed it.
[Reply]
Thanks, great article. It works as I wanted for me.. All *.ttf now available on my Debian GNU/Linux……..
[Reply]
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
[Reply]
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
[Reply]
In Ubuntu I made a new folder .fonts and paste the solaymanlipi font over there and it worked.
[Reply]
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
[Reply]
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.
[Reply]
@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.
[Reply]
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
[Reply]
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.
[Reply]
The tutorial at penguinfonts has been shut down. Does anyone hav a copy?
[Reply]
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.
[Reply]
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
[Reply]