4

Installing fonts in your home directory on Fedora 12

view full story
linux-howto

http://forums.fedoraforum.org – A basic one, but something a lot of folks may not be aware of -- you don't have to go messing around over in /usr/share/fonts anymore if you've got a single-user type machine and just want some fonts for your personal desktop. Since I wipe most partitions when I upgrade (/home is on a separate one) this makes the fonts stay with my login. This is GNOME specific, I do believe KDE has a control panel to install fonts. === Obtain the TTF font(s) you’d like to use; I’ll use the custom Monaco Linux font as an example. Make a new directory in your home called .fonts (note leading . ) Copy the downloaded TTF file into this directory Change directory to .fonts (cd ~/.fonts/) Run the command: mkfontscale (creates fonts.scale) Run the command: mkfontdir (creates fonts.dir) Run the command: fc-cache -fv ~/.fonts (rebuilds ~/.fontconfig/) Given the login name ‘foobar’, it might look like this: Code: $ cd ~ $ mkdir .fonts $ cd .fonts $ wget -q http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf $ mkfontscale $ mkfontdir $ fc-cache -fv ~/.fonts /home/foobar/.fonts: skipping, existing cache is valid: 1 fonts, 0 dirs /var/cache/fontconfig: not cleaning unwritable cache directory /home/foobar/.fontconfig: cleaning cache directory fc-cache: succeeded The tools mkfontscale and mkfontdir are part of the package xorg-x11-font-utils if you find they’re not installed on your system, and fc-cache is in the package fontconfig. You can then check out your fonts using the fc-list tool, like so: Code: $ fc-list | grep Monaco Monaco:style=Regular,Standard,Testo normale,Normaal,Normal,Común,Almindelig,Vanlig tekst,Normaali,レギュラー Way back when (internet time here :) ) you had to also run ‘xset fp rehash‘ but I do believe that is no longer necessary with XFS being removed in place of the fontconfig library/infrastructure. === Original: installing fonts in your home directory on Fedora 12 (HowTos)