Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created April 30, 2013 14:43
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save madrobby/5489174 to your computer and use it in GitHub Desktop.
Save madrobby/5489174 to your computer and use it in GitHub Desktop.
Install Phantom.js on Ubuntu 10.04 and tweak for better rendering quality.
sudo apt-get update
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig
# /etc/apt/sources.list should contain these:
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
wget --no-check-certificate https://gist.github.com/madrobby/5265845/raw/edd7ba1f133067afd2bd60ba7d40e684bb852c6c/localfonts.conf
sudo mv localfonts.conf /etc/fonts/local.conf
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2
cd /usr/local/share/
sudo tar xjf ~/phantomjs-1.9.0-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.0-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
@grantgeorge
Copy link

How does this increase rendering quality?

@aleemb
Copy link

aleemb commented Jul 31, 2013

Minor nitpick: the multiverse edits should come before the apt-get update

Copy link

ghost commented Jan 24, 2014

For anyone else looking at this here is some refferences to the font config settings. https://wiki.ubuntu.com/Fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment