How to Install TrueType Fonts on Linux

Copy Fonts from a Windows Machine

An easy and quick way is to copy .TTF and .TTC files from the C:\Windows\Fonts directory on a Windows machine to some directory on your Linux machine. You do not need to install or register these fonts on Linux in any way; you just need to specify the location of the fonts using the FontConfigs.setFontFolder method in your application.

Install a TrueType Fonts Package

The information provided below will guide you step by step to install Microsoft’s most famous TrueType fonts on Linux distributions such as Fedora and Red Hat Enterprise Linux (RHEL).

Here’s how to do it using the Terminal.

  1. Make sure you have the following RPM packages installed.

    1. rpm-build: If not installed, use the following command to install the rpm-build package
       yum install rpm-build cabextract ttmkfdir
       
  2. wget: If not installed, use the following command

       yum -y install wget
       
  3. Download the latest msttcorefonts spec file from SourceForge using the command as follows,

       wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
       
  4. Build an RPM file using the previously downloaded spec file and the following command,

       rpmbuild -ba msttcorefonts-2.5-1.spec
       
  5. The RPM file will be stored in /root/rpmbuild/RPMS/noarch/; install it as follows,

       rpm -ivh /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
       
  6. Restart the machine to make the changes take effect.

The instructions provided above will install the Microsoft TTFs package, including the following font families:

  1. Andale Mono
  2. Arial Black/Arial (Bold, Italic, Bold Italic)
  3. Comic Sans MS (Bold)
  4. Courier New (Bold, Italic, Bold Italic)
  5. Georgia (Bold, Italic, Bold Italic)
  6. Impact
  7. Tahoma
  8. Times New Roman (Bold, Italic, Bold Italic)
  9. Trebuchet (Bold, Italic, Bold Italic)
  10. Verdana (Bold, Italic, Bold Italic)
  11. Webdings