# 'font-not-found' error when using either the Courier or the Courier Regular fonts with fontspec + luatex

The following document:

\documentclass{report}
\usepackage{fontspec}
\setmainfont{Courier}
\begin{document}
Hello, world!
\end{document}


doesn't compile with the LuaLaTeX format (i.e. with the LuaLaTeX "engine"), and results in the following error message:

ERROR: fontspec error: "font-not-found"

--- TeX said ---
!
! The font "Courier" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H .
!...............................................

l.3 \setmainfont{Courier}

--- HELP ---
From the .log file...

|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
|
| When in doubt, ask someone for help!
|...............................................

Here's the Courier listing in my Font Book:

and here's the corresponding font info page:

This post is closely related to this one, however @Moriambar's answer to that post doesn't apply to the present case, and also the error is different (font-not-found here vs. table index is nill there).

Operating System: macOS Sierra Version 10.12.5
MacTex distribution: MacTeX-2017
LuaTeX: Version 1.0.4

• this might be related to the fact that this is a dfont and not an opentype one – Moriambar Jun 10 '17 at 16:49
• @Moriambar yes see my answer – David Carlisle Jun 10 '17 at 16:52
• Incidentally, Mac has Courier New as a font that in its bold variant looks quite similar to the standard courier one. That one also works within LuaTex, maybe it is an alternative? – Huang_d Jun 10 '17 at 16:55