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!!!!!!!!
Related posts:
- how to move your php development environment to linux (Debian/Ubuntu) Nowadays, lots of php developers are thinking to move their...
- how to enable mod_rewrite in apache2.2 (debian/ubuntu) Here i am going to describe how to enable mod_rewrite...
- install imagemagick support to your debian/ubuntu server imagemagick is one of the best library to work with...
- Website Optimization 01: disable ETag in apache (debian/ubuntu) From last few months i am working to optimize our...
- Website optimization 02: enable deflate /output compression (debian/ubuntu) On the first post of this series we learned how...
Related posts brought to you by Yet Another Related Posts Plugin.





ফেব্রুয়ারি 20th, 2007 at 4:54 am
What about this method?
http://penguinfonts.com/howto/ubuntu.php
It seems quite a bit easier.
মার্চ 2nd, 2007 at 11:33 am
Nice instructions.
I’m running Ubuntu 6.10 and apt couldn’t find “mkfontdir”. But I just skipped it and everything else worked fine.
মে 24th, 2007 at 10:07 am
thanks george , that is easy, but you cann’t create new font dir with that process.
thanks marty, i fixed it.
জুন 14th, 2007 at 5:14 pm
Thanks, great article. It works as I wanted for me.. All *.ttf now available on my Debian GNU/Linux……..
জানুয়ারি 17th, 2008 at 1:45 am
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
জানুয়ারি 17th, 2008 at 10:50 am
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
মে 27th, 2008 at 10:11 pm
In Ubuntu I made a new folder .fonts and paste the solaymanlipi font over there and it worked.
মে 31st, 2008 at 9:47 am
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
মে 31st, 2008 at 12:22 pm
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.
মে 31st, 2008 at 12:26 pm
@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.
মে 31st, 2008 at 1:01 pm
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
মে 31st, 2008 at 2:44 pm
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.
জুন 6th, 2008 at 1:25 am
The tutorial at penguinfonts has been shut down. Does anyone hav a copy?
নভেম্বর 18th, 2008 at 10:33 pm
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.