# dvilualatex cannot find fonts in fresh install of MacTeX 2017

I've repeated the process several times, and it always fails in the same way. I even updated all the packages with TeX Live utility, but the error isn't fixed.

This Mac has a fresh install of Sierra 10.12.6 (formatted the drive for installing 10.12.6 directly), and then did a fresh install of MacTeX 2017 on it.

If I use latex everything works fine.

But if I use dvilualatex I get the following errors for all input files I tried:

kpathsea:make_tex: Invalid fontname [lmroman17-regular]:+tlig;', contains '[' dvips: Font [lmroman17-regular]:+tlig; not found; using cmr10

dvips: Design size mismatch in font [lmroman17-regular]:+tlig; kpathsea:make_tex: Invalid fontname [lmroman12-regular]:+tlig;', contains '[' dvips: Font [lmroman12-regular]:+tlig; not found; using cmr10

dvips: Design size mismatch in font [lmroman12-regular]:+tlig; kpathsea:make_tex: Invalid fontname [lmroman12-bold]:+tlig;', contains '[' dvips: Font [lmroman12-bold]:+tlig; not found; using cmr10

dvips: Design size mismatch in font [lmroman12-bold]:+tlig; dvips: ! invalid char 205 from font [lmroman12-bold]:+tlig; Error: /undefinedfilename in (/Users/mike/first_test.ps)

I googled for these errors, and they seem to be related to fonts not being installed. However, latex can find all fonts, it's only when I use dvilualatex when fonts are not found.

I've installed several versions of MacTeX in different Mac OS X versions during the years, and never had to apply any special steps for dvilualatex finding fonts.

Is there any extra installation step pending in my MacTeX 2017 installation?

In case you need a MWE, here is one:

\documentclass[fleqn,11pt,a4paper]{article}
\makeindex
\begin{document}
\date{\today}
\title{A M.W.E.}
\author{That's me}
\maketitle
Hello, I'm a MWE.
\end{document}

After running dvilualatex mwe.tex and then dvips -o mwe.ps mwe.dvi, I get the following errors (and no output is generated)

This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaleye.com) ' LuaTeX output 2017.07.27:2018' -> mwe.ps kpathsea:make_tex: Invalid fontname [lmroman17-regular]:+tlig;', contains '[' dvips: Font [lmroman17-regular]:+tlig; not found; using cmr10

dvips: Design size mismatch in font [lmroman17-regular]:+tlig; kpathsea:make_tex: Invalid fontname `[lmroman12-regular]:+tlig;', contains '[' dvips: Font [lmroman12-regular]:+tlig; not found; using cmr10

dvips: Design size mismatch in font [lmroman12-regular]:+tlig; dvips: ! invalid char 8217 from font [lmroman12-regular]:+tlig;

• The comparison is wrong: latex searches for type1-fonts in the texmf-tree, lualatex for open-/truetype-fonts in the system's font directory. – TeXnician Jul 27 '17 at 17:14
• Looks like the set of fonts LuaTeX uses by default (Latin Modern family) are incompatible with DVI viewer. So, I guess, don't use LuaTeX with DVI output format. – Sergei Golovan Jul 27 '17 at 17:18
• I've been using dvilualatex since MacTeX 2012 in SnowLeopard, and updated both to newer MacTeX and Mac OS X versions over the years, and, as I far as I can remember, I never had to install any additional fonts, just the main MacTeX pkg. In fact, dvilualatex worked fine on MacTeX 2016 with a default ElCapitan install. BTW, Sergei, I really need to go through DVI because of how my pipeline works. I cannot go to PDF directly. – cesss Jul 27 '17 at 17:54
• Edited to add MWE and its output. – cesss Jul 27 '17 at 18:22

In the newest latex format lualatex uses the TU encoding and so open type fonts that dvips can't handle. You can switch to another fontencoding (OT1 or T1) like this:

\RequirePackage[T1]{fontenc}
\documentclass[fleqn,11pt,a4paper]{article}
\makeindex
\begin{document}
\date{\today}
\title{A M.W.E.}
\author{That's me}
\maketitle
Hello, I'm a MWE.
\end{document}
• I marked your answer as the accepted one because it also reminded me that I should be using \RequirePackage[T1]{fontenc}in all documents that are not expected to be in an unicode environment, and I've been omitting that line for years. – cesss Jul 27 '17 at 19:36

As outlined in LaTeX News 26, the team have switched the standard encoding for Unicode engines (XeTeX and LuaTeX) from OT1 to TU, and as-standard this means that Latin Modern is loaded with these engines. This means that OpenType font files are used out-of-the box, and aligns with the most common use case for these engines. If you need to avoid this, the latexrelease package can be used to revert

\RequirePackage[2015/12/31]{latexrelease}

To date, most DVI tools have not been updated to work with system fonts: this is somewhat frustrating but likely reflects the fact that very few people use LuaTeX without also using PDF output. (There are issues with using OT1/T1 encoded fonts with a Unicode engine, which is why the change has been made.)

• I guess that dvips is one of the tools that are not ready for UT. Thanks a lot for your procedure for reverting to the previous behaviour, I find it complementary to Ulrike FIsher's answer, but in this particular case I prefer to enforce T1 encoding rather than reverting, because I need that my TeX source is portable across different MacTeX versions without changes, so enforcing T1 seems a more compatible approach. – cesss Jul 27 '17 at 19:41