Problem

MS Office in recent versions comes with two commonly used fonts, which are set as default and cannot be used on computers not running the Windows operating system. The fonts in question are Calibri and Cambria.

We are not allowed to copy those fonts over to non-Windows systems, hence a substitute had to be found.

Solution

Fortunately, Google ran into the very same problem while deploying their ChromeOS, and they developed two fonts that are of equal size, namely Carlito and Caladea. These two fonts are licensed under OFL 1.1 and available from Debian Jessie onwards.

To install them, issue these commands as root in a shell:

# apt-get update
# apt-get install fonts-crosextra-carlito fonts-crosextra-caladea

For sure you may also use your favourite package manager to install the two packages fonts-crosextra-carlito and fonts-crosextra-caladea.

Once installed, all applications should automatically start making the proper substitutions for you. (Note: tested under Jesse April 2014). Try reloading your browser or quitting and restarting your word processor to see if it worked.

Drawback

The substitute fonts are not exactly the same as the proprietary ones - that would have meant Google just copied and renamed them, which is not the case.

But to not break the layout of a page coming from MS Office, these fonts are well suited, because they are metric-compatible, meaning each letter will use up the exact same space as in the original fonts. Their astonishingly similar look can be visibly compared.

Using a substitution while viewing and printing, but not changing the font name in a document you receive, edit and send (back), is advisable, too: If you would exchange the font names (which can easily be done, for sure), the person you send the edited copy back will be in need of the fonts you exchanged their fonts to. Just substituting the view and print on your side makes interoperability much more easy.

New documents using proprietary fonts are trickier. Unfortunately, because of the way the fontconfig alias works, most font choosers, such as in libreoffice, will not show Cambria or Calibri as options. However, a new document created using the Caladea font may not show up correctly on a Microsoft Windows computer which would not know to use Cambria instead. The solution for this is to use only fonts which are commonly installed on both computers, such as Times Roman. It is possible to also install a common set of fonts on both computers. For example, while Microsoft does not want its fonts used with GNU/Linux, you may legally copy any font from Debian onto a Microsoft Windows computer. Another workaround would be to keep a document written in a proprietary font and always use that as a template to start new documents.

Manual font substitution

You probably don't need to do this. If you are running an older release of Debian, the fonts may not be set up automatically and you'll have to do the substitutions by hand. You may use fontconfig to exchange the fonts system-wide or just exchange them in your favourite office suite. Examples of both follow.

fontconfig font substitution

If you running an older release of Debian, you can do the font substitutions by hand by creating the following files in /etc/fonts/conf.d/:

30-0-google-crosextra-caladea-fontconfig.conf 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
         <!-- Microsoft -->
        <alias binding="same">
          <family>Cambria</family>
            <accept>
              <family>Caladea</family>
            </accept>
        </alias>
        <alias binding="same">
          <family>Caladea</family>
            <default>
              <family>Cambria</family>
            </default>
        </alias>
</fontconfig>

30-0-google-crosextra-carlito-fontconfig.conf

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
         <!-- Microsoft -->
        <alias binding="same">
          <family>Calibri</family>
            <accept>
              <family>Carlito</family>
            </accept>
        </alias>
        <alias binding="same">
          <family>Carlito</family>
            <default>
              <family>Calibri</family>
            </default>
        </alias>
</fontconfig>

LibreOffice font substitution

In LibreOffice, you exchange Calibri and Cambria with Carlito and Caladea this way:

LO_Options_Fonts.png

Once the program is restarted, documents sent from MS Office look almost the same on your screen and printouts.

Supposedly this works in OpenOffice the very same way.

Non-solution But Good to Know

Microsoft's Calibri and Cambria fonts can be downloaded at no charge provided that the user accepts a proprietary license agreeing, among other things, to use the fonts only in conjunction with Microsoft Windows. (Wikipedia's entry for Cambria has a link to where the fonts can be downloaded). However, be warned that the proprietary versions will likely look much worse on your screen than the OFL ones. This is because Microsoft decided to embed surprisingly bad bitmaps in their fonts and Debian's fontconfig does not disable embedded bitmaps in scalable fonts. (Note that, as of April 2014, this is true even if bitmap fonts are disabled in fontconfig-config as that setting only affects purely bitmap fonts).

Caladea.vs.Cambria-bitmap.png

Note that if both the proprietary and free fonts are installed, the proprietary fonts will be used since a direct match of the font name trumps a substitution alias.

Missing On This Page