-   Slackware (
-   -   how to add some fonts? (

Vincent 11-23-2003 08:58 AM

how to add some fonts?
I have no clue, how the fonts system in linux works.
All I know is that applications like abiword or xchat have very little choice, and I would like to change this lack. :D

What have I to do to accomplish this?

Obscure 11-23-2003 04:55 PM

You can add your fonts coping it to /usr/X11R6/lib/X11/fonts/ directories...and running (inside the dir) fc-cache -f command
You need to create a new font index using mkfontdir
Your fonts directory must be listed into /etc/X11/XF86config file (take a look) and must have read permission (444)

Vincent 12-02-2003 07:17 AM

mkfontdir does not work... command not found

dugan 12-02-2003 10:50 AM

I'll expand on what Obscure said.

There are two font management systems you have to worry about. Fontconfig has one, and X has one. You deal with the two of them separately.


Fontconfig supplies fonts to your gtk2 and qt programs. First, put your new Truetype fonts into a directory. Then look for a file called /etc/fonts/fonts.conf. Read it. Learn where it searches for fonts, and how to add a font search path to it, but don't edit it. Instead, make your changes to /etc/fonts/local.conf. Then run "fc-cache -f -v" as root. The new fonts should be accessible now.


To add fonts to X, you need ttmkfdir. Put all your new Truetype fonts into a directory. Then go to that directory and type:

ttmkfdir > fonts.scale
ttmkfdir > fonts.dir

If you look in /etc/XF86Config, it will show you which directories X looks in for fonts. It will also become obvious how to add a "fontpath" to it. Add your new font directory, which contains your fonts and your fonts.scale and your fonts.dir, to your XF86Config's fontpaths. Then restart X.

Nimoy 12-02-2003 12:03 PM

XFree86 Font De-uglification HOWTO ;)

All times are GMT -5. The time now is 03:56 PM.