The following document:

Hello, world!

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:

Courier font in Font Book

and here's the corresponding font info page:

Courier font info

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

  • 1
    this might be related to the fact that this is a dfont and not an opentype one
    – Moriambar
    Jun 10, 2017 at 16:49
  • 1
    @Moriambar yes see my answer Jun 10, 2017 at 16:52
  • 1
    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, 2017 at 16:55

1 Answer 1


The dfont format is not supported in recent versions of luatex, see


  • Remove support for builtin Fontforge libraries (this includes the PFA, PFB, DFONT, and feature file readers).

You may have the Courier also available as truetype or opentype (or if not, I understand that there are font utilities available on the mac to make that conversion, although I do not have a Mac to give details).

  • I couldn't have known this. Nice answer ;)
    – Moriambar
    Jun 10, 2017 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .