3

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?

14
  • 1
    run fc-list | grep "EB Garamond". Does it lists the fonts? If yes, give a complete example how you define the font setting.
    – user2478
    Mar 24, 2014 at 9:58
  • 1
    Is it listed or not? However, for fonts use 644 as permission.
    – user2478
    Mar 24, 2014 at 10:16
  • 1
    Ok, it is listed. Then you have a wrong \fontspec or \setmainfont command. Show what you did!
    – user2478
    Mar 24, 2014 at 10:29
  • 1
    have /usr/local/share and /usr/local/share/fonts 755 permission?
    – user2478
    Mar 24, 2014 at 10:37
  • 1
    Again: Create a small example and then show the logfile!
    – user2478
    Mar 24, 2014 at 11:08

1 Answer 1

1

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
2
  • It fails, I dont get a pdf. The log file is here: dropbox.com/s/vg8z0k8l0q5x3xy/example2.log And again with sudo works, and I get the same output as you: MZZYTQ+EBGaramond12-Regular-Identity-H CID Type 0C Identity-H yes yes yes 5 0 Mar 24, 2014 at 12:25
  • By setting 755 in all font folders and all its contents and keeping the S bit on in the permissions. It seems to work now. Really thanks for your time. Mar 24, 2014 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.