Install fonts

From Fluxbox-wiki

(Redirected from Howto install fonts)
Jump to: navigation, search

Contents

How to install fonts

So you need some new fonts ? Or you downloaded a bunch of nice fonts from 1001fonts, fontifile, or from acidfonts Hell you might even go crazy and used google to search for free fonts Google Search for "free fonts"

Now you are getting serious ... but .. how do I install these fonts in my linux box ?? huh .. Here is where Fluxmod comes into action with a nice guide that tells you how to do it.


Installing fonts the first time

1. Make a font dir in your $HOME

mkdir ~/.fonts

2. Copy the fonts you want to have installed into ~/.fonts/ 3. Create an index of font files in the dir

mkfontdir ~/.fonts

4. edit your /etc/X11/XF86Config or /etc/X11/xorg.conf (must be done as root). Search for FontPath elements and add the following:

FontPath "/home/your_username/.fonts/"

5. Edit /etc/fonts/local.conf (once again as root), and after <fontconfig> add a line:

<dir>/home/your_username/.fonts</dir>

6. Regenerate font cache (as root)

fc-cache -fv

That should give something like this:

fc-cache: "/usr/X11R6/lib/X11/fonts/Type1":
caching, 29 fonts,0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/sharefont": caching,21 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/truetype": caching, 30 fonts, 0 dirs
fc-cache: "/usr/share/fonts": caching, 0 fonts, 6 dirs
fc-cache: "/usr/share/fonts/ttf-bitstream-vera": caching, 10 fonts, 0 dirs
fc-cache: "/usr/share/fonts/ttf": caching, 0 fonts, 1 dirs
fc-cache: "/usr/share/fonts/ttf/ja": caching, 0 fonts, 2 dirs
fc-cache: "/usr/share/fonts/ttf/ja/aqua": caching, 1 fonts, 0 dirs
fc-cache: "/usr/share/fonts/ttf/ja/mikachan": caching, 4 fonts, 0 dirs
fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 1 dirs
fc-cache: "/usr/share/fonts/default/Type1": caching, 35 fonts, 0 dirs
fc-cache: "/usr/share/fonts/freefont": caching, 78 fonts, 0 dirs
fc-cache: "/usr/share/fonts/corefonts": caching, 30 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/75dpi": caching, 349 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/100dpi": caching, 358 fonts, 0 dirs
fc-cache: "/home/ikaro/.fonts": caching, 205 fonts, 2 dirs
fc-cache: "/home/ikaro/.fonts/artwiz": caching, 16 fonts, 0 dirs
fc-cache: "/home/ikaro/.fonts/lfp-fix": caching, 68 fonts, 0 dirs
fc-cache: succeeded


Please note the 4 last lines, they show that it has cached some 300 fonts under ~/.fonts (where you installed them). If you don't see those lines, you did something wrong :|

Now you can restart X and use the new fonts in your applications.

Installing some more fonts

What steps are not needed? I remember only having to put the fonts into ~/.fonts/ and run fc-cache -fv but at the moment I can't seem to get any fonts installed...


Post Scriptum

The artwiz fonts are not scalable, that means that its size its FIXED . Scalable fonts cant be used in terminals, although xterm supports AA, you will end up with a terminal with _huge_ fonts, and that doesn't look so good. You can try it your self with : aterm -fn verdana and then try again with 'aterm -fn nu' See the difference ?

Originally published by ikaro on fluxmod.dk

Personal tools
Google Ads