Wednesday, August 31, 2011

Adding Windows Truetype Fonts to Linux

Out of the box, modern Linux systems have an adequate number of fonts for any task.  However like all things Linux, they are different from what the user who has just migrated from Windows is used to having, even with the ttf-mscorefonts package installed  This post will be a quick tutorial on how to add those "missing" Windows fonts to your Linux system.

Quick legal disclaimer:  this is a technical how-to article, not a legal interpretation of Microsoft's EULA for Windows or any other software that may have installed Truetype fonts under Windows.  If you have any questions or concerns, read the license agreement for yourself or seek other counsel before proceeding.

The assumption is that Windows is still available in a multi-boot configuration and that the Windows partition can be mounted in Nautilus, the Linux file manager.  If that is not the case, there are many sources of truetype fonts available on the web for free, even including handwriting fonts if you're interested.  The basic steps are:
  1. Open the Nautilus file manager and select the correct "nn Gb Filesystem", to mount the Windows partition
  2. Open a terminal session and become root via the su command
  3. cd /usr/share/fonts/truetype
  4. mkdir winxp
  5. cp /media/your_mount_point/Windows/Fonts/*.ttf  /usr/share/fonts/truetype/winxp
The above mixes using the UI and terminal to use the easiest of both.  Details of using the mount command can be found quickly elsewhere on the web - both to mount the Windows parition from the terminal or query the mount point Nautilus selected.  It'.s probably the only really long hex number though.  Mounting the partition via the UI and verifying that /Windows/Fonts exists was also much easier to write up.

Lastly, there's nothing unique about the choice of the winxp/ directory name.  If you choose to add additional fonts from other sources, choose any name (ex: myfonts/) for the directories you create, as long as they are all under /usr/share/fonts/truetype.

I just walked a relatively new Linux user through this and so thought a quick post might help someone else too.

Enjoy.

No comments:

Post a Comment