Microsoft fonts

From ArchWiki

This article explains how to install TrueType Microsoft fonts and emulate Windows' font rendering.

Tip: See Metric-compatible fonts for alternatives.


Automatic Installation

The easiest way to install the fonts is by installing ttf-ms-win10-autoAUR. This automatically fetches the Windows 10 Enterprise 90-day evaluation edition and extracts the required fonts from it.

Using fonts from a Windows partition

If there is a Windows partition mounted, its fonts can be used by linking to them. It may be necessary to apply a workaround for system compressed files in order to read the font files.

Note: Users of google-chromeAUR should opt to copy as symlinked fonts cause Chrome to crash.

For example, if the Windows C:\ partition is mounted at /windows:

# ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts

Then regenerate the fontconfig cache:

# fc-cache --force

Alternatively, copy the Windows fonts to /usr/share/fonts/:

# mkdir /usr/share/fonts/WindowsFonts
# cp /windows/Windows/Fonts/* /usr/share/fonts/WindowsFonts/
# chmod 644 /usr/share/fonts/WindowsFonts/*

Then regenerate the fontconfig cache:

# fc-cache --force

Extracting fonts from a Windows ISO

The fonts can also be found in a Windows ISO file. The format of the image file containing the fonts in the ISO is either WIM (Windows Imaging Format) if the ISO is downloaded online or ESD (Windows Electronic Software Download) if it is built with Windows' Media Creation Tool. Extract the sources/install.esd or the sources/install.wim file from the .iso and look for a Windows/Fonts directory within this file. It can be extracted using 7z (in p7zip) or wimextract (in wimlib). See an example below using 7z:

$ 7z e Win10_1709_English_x64.iso sources/install.wim
$ 7z e install.wim 1/Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/
$ 7z e install.wim Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} -ofonts/ # Windows 7

The fonts and the license will be located in the fonts directory.

Current packages

Note: These packages do require access to a Windows 7/8/10/11 and/or a Office 2007 setup or installation media, consult corresponding PKGBUILD for details.

Legacy packages

Note: The fonts provided by these packages are out-of-date and are missing modern hinting instructions and the full character sets. It is recommended to use the above packages.

ttf-ms-fontsAUR includes:

Warning: According to original Microsoft's End User License Agreement, there are some legal limitations when using the above fonts.

You can also obtain ttf-tahomaAUR which, as you might expect, contains Tahoma.

ttf-vista-fontsAUR includes:

Fontconfig rules useful for MS Fonts

Often websites specify the fonts using generic names (helvetica, courier, times or times new roman) and a rule in fontconfig maps these names to free fonts (Liberation, Google CrOS, GUST TeX Gyre...). The substitutions are defined in /etc/fonts/conf.d/30-metric-aliases.conf.

To make full use of the Ms Windows fonts it is necessary to create a rule mapping those generic names to the Ms Windows specific fonts contained in the various packages above:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
       <alias binding="same">
       <alias binding="same">
         <family>Times New Roman</family>
       <alias binding="same">
         <family>Courier New</family>

It is also useful to associate serif,sans-serif,monospace fonts in your favourite browser to MS fonts.

Windows 8

The ttf-ms-win8AUR split package is intended as a more up-to-date replacement for ttf-ms-fontsAUR, ttf-vista-fontsAUR and ttf-win7-fontsAUR.

Although it provides newer versions of the fonts, it cannot automatically download the fonts due to license issues.

Note: usage of Microsoft fonts outside running Windows system is prohibited by EULA (although in certain countries EULA is invalid). Please consult Microsoft license before using fonts.

You can acquire fonts from an installed and fully updated Windows 8.1 system. Any edition of Windows 8.1 build Windows 8.1 6.3.9600.17238 will work.

On the installed Windows 8.1 system fonts are usually located in %WINDIR%\Fonts and license file is %SYSTEM32%\license.rtf.

You need the files listed in the source=() array. Place them in the same directory as this PKGBUILD file, then run makepkg.

makepkg --pkg ttf-ms-win8 will make just the Windows 8.1 core fonts package which should cover even more than ttf-ms-fontsAUR.

Known issues

Symbols not displaying properly with Poppler-based PDF readers

The TrueType Microsoft font "symbol.ttf" is buggy with Poppler, math symbols may not display correctly in Poppler-based PDF readers.