Monday, April 23, 2012

Debian Linux Install Truetype Fonts For Xorg

How do I install TrueType fonts under Debian GNU/Linux desktop operating systems?

The True Type Font was originally developed by Apple Computer. It is most commonly used on Microsoft Windows based systems so sometimes called as "Windows Fonts". You can easily install the true type fonts under Debian Linux. Open a terminal and type the following command as root to install the same:
# apt-get install ttf-mscorefonts-installer
Sample outputs:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cabextract
... output truncated ...
Starting with Debian lenny, free alternatives for the common Microsoft fonts Arial, Courier and Times New Roman are available in ttf-liberation package, enter:
# apt-get install ttf-liberation
Close the terminal and logout from your current gnome / kde session. Login again to refresh and reload the fonts.

Result:

A screen-shot without TrueType fonts:
nixCraft WebPage Without TrueType Fonts
Fig.01: Before TrueType Fonts
A screen-shot after installing TrueType fonts:
nixCraft WebPage with TrueType Fonts
Fig.02: After TrueType Fonts

How Do I List All Installed Fonts?

Type the following command:
$ fc-list
Sample outputs:
Verdana:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
Liberation Mono:style=Regular
Nimbus Sans L:style=Regular Italic
DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
Times New Roman:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
Webdings:style=Regular
URW Palladio L:style=Roman
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
Century Schoolbook L:style=Bold Italic
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
....
..
..

How Do I Install TrueType Fonts on Debian Linux?

Open a nautilus.
  1. Type fonts:// and press [Enter] key.
  2. You will get the list of all installed fonts.
  3. Open another nautilus windows
  4. Select your TTF font file
  5. Drag and drop file into the fonts window.
Again logout and login back to refresh new fonts.

How Do I Configure Fonts?

The fontconfig is the configuration tool. Use the following commands to reconfigure default font rendering:
# dpkg-reconfigure fontconfig-config
# dpkg-reconfigure fontconfig

How Do I Update Fonts Cache?

Type the following command as root user:
# fc-cache -fv
OR
$ sudo fc-cache -fv
Sample outputs:
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/X11/100dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/75dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 9 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 8 dirs
/usr/share/fonts/truetype/freefont: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/msttcorefonts: caching, new cache contents: 60 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-dejavu: caching, new cache contents: 21 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-liberation: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-lyx: caching, new cache contents: 9 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-sil-gentium: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-sil-gentium-basic: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/type1: caching, new cache contents: 0 fonts, 2 dirs
/usr/share/fonts/type1/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/usr/share/fonts/type1/mathml: caching, new cache contents: 1 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts: skipping, no such directory
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
/root/.fonts: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded


No comments:

Post a Comment