#!/bin/sh

# Originaly by: http://www.stchman.com/
# Modified by: Bill.jr http://www.techdot.eu/

# This script will install the Microsoft fonts on your Ubuntu installation
# This script must be run as root with 755 permissions

# update package manager
sudo apt-get update

# install msttcorefonts package
sudo apt-get install msttcorefonts

# make sure that one has an unzip
sudo apt-get install unzip

# Install the Tahoma fonts to the msttcorefonts folder
# Since Tahoma does not come with msttcorefont, we will install them manually
# Change to the users home folder
cd ~

# get the tahoma.zip file from www.stchman.com
wget http://www.stchman.com/tools/tahoma.zip

# extract the .zip achive to the msttcorefonts folder
sudo unzip -d /usr/share/fonts/truetype/msttcorefonts ~/tahoma.zip

# update the font cache
sudo fc-cache -f -v

# remove the .zip file as it is no longer needed
rm -r -f ~/tahoma.zip

# get the scripts from www.stchman.com to make Ubuntu look like M$ fonts
# change to users home folder
cd ~

# get the font scripts from www.stchman.com
wget http://www.stchman.com/tools/MS_fonts/fontconfig.tbz

# unpack archive in the /etc/fonts folder
sudo tar -xvjpf ~/fontconfig.tbz -C /etc/fonts/

# remove the archive that was downloaded
rm -r -f ~/fontconfig.tbz
