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.
- Make sure you have the following RPM packages installed.
- rpm-build: If not installed, use the following command to install the rpm-build package
yum install rpm-build cabextract ttmkfdir
- wget: If not installed, use the following command
yum \-y install wget
- Download the latest msttcorefonts spec file from SourceForge using the command as follow,
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
- Build a RPM file using the previously downloaded spec file and the following command,
rpmbuild \-ba msttcorefonts-2.5-1.spec
- 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
- Restart the machine to make the changes take effect.
The instructions provided above will install the Microsoft TTFs package including the following font-families:
- Andale Mono
- Arial Black/Arial (Bold, Italic, Bold Italic)
- Comic Sans MS (Bold)
- Courier New (Bold, Italic, Bold Italic)
- Georgia (Bold, Italic, Bold Italic)
- Impact
- Tahoma
- Times New Roman (Bold, Italic, Bold Italic)
- Trebuchet (Bold, Italic, Bold Italic)
- Verdana (Bold, Italic, Bold Italic)
- Webdings
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.
- Download the required font and place it in any directory such as Downloads directory.
- Create a new directory with mkdir command and name the new directory as msfonts
mkdir /usr/share/fonts/msfonts
.
- 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/
- Rebuild font cache files using
fc-cache -fv
- Perform the conversion.