Fonts

By far the largest impact on MuPDFs size is given by choosing which fonts to include. Accordingly, there are a range of different options:


\begin{lstlisting}
/*
Choose which fonts to include.
By default we include the...
...ally don't want to do that except for measurement purposes!) */
\end{lstlisting}

If documents require a font that is not present, systems will try to `fallback' to alternative ones. When this is not always successful (or indeed possible) unknown glyphs are often rendered as empty boxes, known informally in the typographic world as `Tofu'.

By default MuPDF includes all the fonts it knows about. The configuration options are therefore a matter of choosing which scripts should instead be rendered as tofu.

Accordingly, to drop support for rendering emoji characters, you'd define TOFU_EMOJI.

The largest set of fonts are those for the wide range of worldwide scripts given by the Google Noto fonts. These can be omitted by defining TOFU.