# Montserrat font/package, “invalidfont” error when printing

I'm using the montserrat package to use the Montserrat font and I'm having troubles printing the resulting PDF.

This is a trivial minimal example:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[defaultfam]{montserrat}

\begin{document}

HELLO WORLD

\end{document}


Trying to print the resulting PDF (compiled with pdflatex) on the department's Xerox Phaser 7500 results into an error page being printed instead, with the following error printed on it:

ERROR:
invalidfont
OFFENDING COMMAND:
define font
STACK:
/Font
--nostringval--
/Montserrat-Regular
-mark-
-mark-
-mark-
-mark-


The problem does not reproduce on any other printer I have available (also tried on other types of Xerox printers).

The problem might not be specific to that printer, however, since there is also another easier way to reproduce the problem, as follows:

1. Compile the MWE with latex+dvips
2. Open the resulting PS file with macOS Preview app
3. Preview fails to show the PS file with a rather generic error ("Unable to convert the 'mwe.ps' file into a PDF file")

However, converting the PS file to PDF using the ps2pdf command works, and the resulting PDF file is printed properly. However, I'd avoid passing through ps2pdf because of the disadvantages we all know (and the failing printer is the only color printer we have at the department, so I need to use that one).

Any idea on what is happening? is it a bug in the montserrat package and/or in the font?

EDIT: This is the log when compiling the file: https://pastebin.com/H6L8KC6F

• Opens fine in Okular. Errors/messages from dvips? Log? – cfr Aug 1 '18 at 23:28
• Curiously enough, after doing latex gigabytes && dvips gigabytes, running gs-X11 gigabytes.ps shows the page, but pstopdf fails with Error: invalidfont. – egreg Aug 2 '18 at 13:37
• @egreg I don't have pstopdf, but ps2pdf works fine. (As I guess you'd expect, since gs worked.) – cfr Aug 2 '18 at 23:53
• tllint reports problems with e.g. Montserrat-Regular.pfb. However, it reports some issues with lmr10.pfb, too (although not the same ones). I don't know enough to know whether the problems are likely to be problematic in practice or not. – cfr Aug 3 '18 at 0:02
• @cfr Indeed, t1lint reports problems with StemSnapH and the error with pstopdf has ErrorInfo: StemSnapH --nostringval-- ]. – egreg Aug 3 '18 at 8:18