Monday 18 August 2008

Ubuntu: Installing Truetype Fonts (TTF)

To install basic Microsoft TrueType Fonts such as Arial, Courier, Impact, Times New Roman etc. you need to enable the "Universe repositories" and install the msttcorefonts package:

$ sudo apt-get install msttcorefonts


New fonts will appear under the /usr/share/fonts/truetype/msttcorefonts directory.
Truetype fonts can also be installed by simply copying the .ttf files in some subdirectory under the /usr/share/fonts/truetype/.
For example, If you downloaded some neat TTF fonts over the internet, you can install them like this:

neat_fonts$ sudo mkdir /usr/share/fonts/truetype/neat
neat_fonts$ sudo cp *.ttf /usr/share/fonts/truetype/neat


Note: Name the subdirectory under /usr/share/fonts/truetype/ as you wish; "neat" is just for demonstrating purpose

Log out and than login again to be able to use new fonts or just run this command to regenerate the fonts cache:

$ sudo fc-cache -fv


Those fonts will now be accessible to any user on the Ubuntu system.

No comments: