# LuaLaTeX + fontspec: Font not found

This refers to my previous thread How to use the calibri font. I am using the Calibri font with lualatex. MWE:

  \documentclass[11pt,table,a4paper]{article}
\usepackage{fontspec}
\setmainfont{Calibri}
\begin{document}
The ends  of words and sentences are marked
by   spaces. It  doesn't matter how many
spaces    you type; one is as good as 100.  The
end of   a line counts as a space.
\end{document}


I am getting following error:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "Calibri" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.3   \setmainfont{Calibri}


How can I avoid such error?

-
\documentclass{...} is better than obsolete \documentstyle{..}? –  Harish Kumar Feb 8 '13 at 2:26
You are writing a LaTeX document, so you need to compile it using lualatex, not luatex. –  Aditya Feb 8 '13 at 2:34
I compiled using lualatex but i get following error message. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! fontspec error: "font-not-found" ! ! The font "Calibri" cannot be found. ! ! See the fontspec documentation for further information. ! ! For immediate help type H <return>. !.............................................. –  user15662 Feb 8 '13 at 3:01
I edited my question after making changes as suggested. –  user15662 Feb 8 '13 at 4:14
Just checking, but as the error message suggests, are you sure you have the Calibri font installed on your system? –  Xavier Feb 8 '13 at 7:18

Calibri is a Windows font. If you have running Windows then it should be found by default, if present. Look into c:\Windows\Fonts
If you are running Linux then copy the TrueType files into your local /usr/local/share/fonts/truetype/ or your personal ~/.fonts/Calibri/. Then LuaTeX should update the font database by default.
You can also run mkluatexfontdb -v then you'll see which directories are searched.