JustPaste.it

## We will use the font rendering of Ubuntu 10-11. For that we will
## need a patched libcairo2. It can be pulled in if we install
## Iceweasel 10, but it's not in the default depos, so:
vim /etc/apt/sources.list
  ## Add these:
  deb http://backports.debian.org/debian-backports squeeze-backports main
  deb http://mozilla.debian.net/ squeeze-backports iceweasel-release
wget -O- -q http://mozilla.debian.net/archive.asc | gpg --import
gpg --export -a 06C4AE2A | sudo apt-key add -
apt-get update

## And install it:
apt-get install -t squeeze-backports iceweasel

## Now we have to tell the X Server to use a specific hinting/antialias
## setup by creating ~/.fonts.conf:

vim ~/.fonts.conf

  <?xml version="1.0"?>
  <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  <fontconfig>

     <match target="font">
      <edit name="antialias" mode="assign">
        <bool>true</bool>
      </edit>

      <edit name="hinting" mode="assign">
        <bool>true</bool>
      </edit>

      <edit name="rgba" mode="assign">
        <const>rgb</const>
      </edit>

  <!--
  "The autohinter and subpixel rendering are not designed to work
   together and should not be used in combination."
  from: https://wiki.archlinux.org/index.php/Font_Configuration"
  -->
      <edit name="autohint" mode="assign">
        <bool>false</bool>
      </edit>

      <edit name="hintstyle" mode="assign">
        <const>hintslight</const>
      </edit>

      <edit mode="assign" name="lcdfilter">
        <const>lcddefault</const>
      </edit>
    </match>

  </fontconfig>

## After restarting X, the font rendering should look like in Ubuntu.

## You may also want to use the Ubuntu fonts:
Download it from here: http://font.ubuntu.com/

# If needed: apt-get install unzip
unzip somewhere/ubuntu-whatever.zip
cd ubuntu*
mkdir ~/.fonts
cp *.ttf ~/.fonts
fc-cache

# Now go to the font selector of the whatever desktop environment you
# are using, and select Ubuntu, Regular, 11pt (at least assuming 96 DPI)
# on the proper places.
# Xterm font config tends to be tricky. Do:
vim ~/.Xresources
  ## Add this line:
  XTerm*faceName: xft:ubuntu mono:size=11:style=medium
## For this to take effect for new Xterms without restarting X:
xrdb -merge ~/.Xresources