Installing true type fonts for linux

May 4th, 2008 mysurface Posted in Misc | Hits: 44906 | 10 Comments »

While searching the ways of installing true type fonts to linux, I get all sort of solutions. Some will ask you to copy and paste to fonts:/// folders in nautilus, or fonts:/ in konqueror. Some may even ask you to copy your ttf fonts to /usr/share/fonts and run fc-cache. All sort of ways doesn’t works so well during last two years.

Nowadays, I think all sort of ways may works under particular linux distro, the steps to install font might vary between different linux distros, but its they a common way that it will works for any distro? For me, installing custom fonts should be as straight forward as ‘copy and paste’ ttf files to a specific folders without needing to run any command or configuration script.

Recently, I find the ‘copy and paste’ way. I just need to copy my downloaded ttf font files to ~/.fonts. If your home directory does not contain .fonts folder, create a new one

For examples, I download a font from a site, it consist of multiple ttf files.

Readme.txt
SF New Republic Bold Italic.ttf
SF New Republic Bold.ttf
SF New Republic Italic.ttf
SF New Republic Sample.jpg
SF New Republic SC Bold Italic.ttf
SF New Republic SC Bold.ttf
SF New Republic SC Italic.ttf
SF New Republic SC.ttf
SF New Republic.ttf

I create a new folder “SF New Republic” in ~/.fonts , and copy all these files into that folder. Next I open oowriter ( open office writer), straight away I can use the font without doing fc-cache or any configurations.

Anyway, there is a command to verify fonts have successfully installed to your system:

fc-list | grep "SF"
SF New Republic:style=Regular
SF New Republic:style=Bold
SF New Republic:style=Bold Italic
SF New Republic SC:style=Bold
SF New Republic SC:style=Italic
SF New Republic SC:style=Regular
SF New Republic SC:style=Bold Italic
SF New Republic:style=Italic

fc-list is actually listing all the installed fonts, with pipe over grep, we can verified whether are those fonts successfully installed.

I have tested this method on:
1. Ubuntu Hardy Heron 8.04
2. Fedora 8

I would like to do a survey at here, if you are running different distro listed above, can you try out this method?

p.s. You can download fonts at http://www.dafont.com

10 Responses to “Installing true type fonts for linux”

  1. Nice tips. I have been following your blog for some time now and I am very impressed with the quality. Keep the good work :)

    Srikanth

  2. I just tried it, made the folder and moved the ttf files into that folder, worked like a charm. thanks, that was too easy!

  3. @Srikanth, thanks.

  4. @cliff: if you read this comment, would you mind tell us what linux distro are you using? Thanks.

  5. Starhawk Laughingsun Says:

    It works in Ubuntu Dapper Drake 6.06 LTS using the gnome desktop.

  6. dryicebomb Says:

    made the ~/.fonts folder, works great in Ubuntu 8.04 LTS using gnome, gimp, and oowriter. Thanks for the great tip.

  7. this way works for only one user, doesn’t?
    so if there are more users all of them should do it.
    i think there must be a way which is good for all users.
    :)

  8. great! works painlessly. Keep up the good work.

  9. I’m on Ubuntu 10.10 and it does not work. I’m sure I have carefully followed all steps you described above… What did I miss?

  10. I read this post fully concerning the resemblance of latest
    and earlier technologies, it’s remarkable article.

    Feel free to visit my web site :: using a pill to help with hair loss

Leave a Reply