# [Tex/LaTex] Installed font not working

fontsfontspectemplates

I have downloaded a latex template for a thesis from Harvard University.

Currently I'm using Linux Mint Nadia 14.

The instructions of the template tells you to install the needed fonts (which are included) with the command: sudo cp fonts/* /usr/local/share/fonts/
I have done so but I had to add to the command the flag -r in order to work properly.
When I try to compile the tex (using a compilation script also included which uses xelatex) I get the following error:

! fontspec error: "font-not-found"
!
! The font "EB Garamond" cannot be found.
!
! See the fontspec documentation for further information.


EB Garamond is one of the fonts already installed by the previous command. I have also tried to execute sudo fc-cache -fsv from the cl. And I get in the output
/usr/local/share/fonts/EB Garamond: caching, new cache contents: 10 fonts, 0 dirs

But the problem persists. Apparently it is a problem with permissions because it works with sudo. But changing the permissions of the font folders and files to 644 has not solved the problem either.

With this small example:

\fontfamily{EB Garamond}
\documentclass{article}
\begin{document}
hi
\end{document}


I get the following logfile

Any idea?

This is an example document:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\begin{document}
foo
\end{document}


run it with xelatex and then show the logfile if it fails. With

pdffonts testfile.pdf I get

name                         type        encoding    emb sub uni object ID
---------------------------- ----------- ----------- --- --- --- ---------
ZXTLQL+EBGaramond-Identity-H CID Type 0C Identity-H  yes yes yes      5  0