How to use the Calibri font

As others have pointed out in comments, to use system fonts (or any local .otf or .ttf font) easily, you need to use the fontspec package and compile your document with either xelatex or lualatex. pdflatex won't work, but switching to xelatex or lualatex shouldn't require any major change in your document other than converting to utf8 encoding and removing any \usepackage[...]{inputenc}.

FYI, lualatex is the official successor of pdflatex in LaTeX3, and I personally see very little reasons not to switch asap to lualatex. If you want to read more on the differences, these links might provide you some more background:

  • Differences between LuaTeX, ConTeXt and XeTeX
  • Frequently loaded packages: Differences between pdfLaTeX and LuaLaTeX
  • Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX
  • Frequently loaded packages: Differences between XeLaTeX and LuaLaTeX

Now, if you really can't / do not want to switch to xelatex or lualatex, and if you are really brave, you can stay with pdflatex, convert your Calibri font to Type1 and make it available to TeX. The tedious process is explained here.


Had the same problem and solved it in the following way:

  1. Obtain your properly licensed Calibri .ttf font files. For the Calibri-family these are four files: Regular calibri.ttf, Bold calibrib.ttf, Bold-Italic calibriz.ttf, ItalicFont calibrii.ttf.
  2. Place them in your OS's truetype font directory in their own folder. For Ubuntu the path would be "/usr/share/fonts/truetype/calibri/"
  3. As Xavier mentioned you use LuaLaTeX with the fontspec package to specify the Calibri font family:

    \usepackage{fontspec}
    \setmainfont[Path=/usr/share/fonts/truetype/calibri/,
        BoldItalicFont=calibriz.ttf,
        BoldFont      =calibrib.ttf,
        ItalicFont    =calibrii.ttf]{calibri.ttf}
    

Tags:

Fonts