Installing Microsoft TrueType Fonts on Linux

[ ]

In scenarios as discussed above, it is recommend to install the required TTFs on machine before executing the conversion process. Below provided information will guide you step by step to install the Microsoft’s most famous TTFs on Linux distributions such as Fedora, Red Hat Enterprise Linux (RHEL) & CentOS.

You may require ‘root’ level privileges therefore login as ‘root’ or get sudo configured.

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
  1. wget: If not installed, use the following command
 yum \-y install wget
  1. Download the latest msttcorefonts spec file from SourceForge using the command as follow,
  1. Build a RPM file using the previously downloaded spec file and the following command,
 rpmbuild \-ba msttcorefonts-2.5-1.spec
  1. The RPM file will be stored in: /root/rpmbuild/RPMS/noarch/, install it as follow,
 rpm \-ivh /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm 
  1. Restart the machine to make the changes take effect.

As discussed above, if you do not have the required fonts installed on the Linux environment, you will not be able to get the correct rendering while converting metafiles to raster formats where the font used in the metafile could be any. It is quite possible that the required font does not exist in the Microsoft’s core package. In such scenarios, it is recommended to acquired the required font and install it manually using the following steps.

You may require ‘root’ level privileges therefore login as ‘root’ or get sudo configured.

Here’s how to install a particular font.

  1. Download the required font and place it in any directory such as Downloads directory.
  2. Create a new directory with mkdir command and name the new directory as msfonts
 mkdir /usr/share/fonts/msfonts


  1. Copy the downloaded font to the directory created in above step. For the sake of demonstration, consider the downloaded font file name is Symbol.ttf then the command would be
 cp SYMBOL.TTF /usr/share/fonts/msfonts/
  1. Rebuild font cache files using
 fc-cache -fv
  1. Perform the conversion.