tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

When including a beamer theme, it looks like it's trying to recursively include every font on my system

Open elken opened this issue 1 year ago • 6 comments

Issue

When using the following MRE; I get spammed with warnings for quite a while (I killed it after 2 minutes)

\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
test
\end{document}

image

I'm a complete LaTeX novice, so I have no clue how to debug this. The specific line is \usetheme, removing it seems to work fine even in my massive example. Other themes also seem to be okay, just metropolis.

Versions

Tectonic 0.14.1 Fedora Sericea 39 (tectonic running in a regular Fedora 39 container)

elken avatar Sep 21 '23 12:09 elken

Seems to be resolved by installing Fira fonts; though there's an underlying issue here I think that it should report the missing font error on the package.

I'll leave this open for now, but I've worked around it somewhat for now. I still get the same warning printed, but I can at least compile documents now.

elken avatar Sep 21 '23 13:09 elken

See here: https://github.com/tectonic-typesetting/tectonic/issues/8#issuecomment-1329332011.

I unfortunately don't have better news. The problem is in the metropolis package itself - as Tectonic is based on XeLaTeX, if metropolis doesn't work well with XeLaTeX it also doesn't work with Tectonic.

The ultimate issue is that metropolis is trying to load a font (which is bundled by Tectonic), but it loads it in such a way that is currently not able to resolve the font in the Tectonic bundle (#9), hence Tectonic tries to consult system fonts, which is not reproducible, thus the big amount of warnings (#8) for each font examined.

I hope I can get to solving the root issue. In the mean time, as long as using the system fonts works for you, you can ignore the warnings.

It should also work to have the patched file (which I link in the comment linked above) in the same directory as your document. But I don't recommend to actually use this in the long term (it's problematic with regards to eventual updates/fixes).

vlasakm avatar Sep 21 '23 21:09 vlasakm

Yeah even though my actual document doesn't use the fonts, installing them does reduce the warnings to a usable number at least.

elken avatar Sep 22 '23 07:09 elken

You can solve the issue by configuring fonts yourself instead of relying on Metropolis to do it.

Instead of using the whole Metropolis, use only outer, inner and color themes:

\useoutertheme{metropolis}
\useinnertheme{metropolis}
\usecolortheme{metropolis}

then configure fonts youself:

\usepackage{fontspec}
\usepackage{unicode-math}
    \setmainfont{...}
    \setsansfont{...}
    \setmonofont{...}
    \setmathfont{...}

ilyapopov avatar Oct 08 '23 12:10 ilyapopov

Indeed it can be worked around, but that doesn't resolve the underlying issue here :D

elken avatar Oct 08 '23 13:10 elken

May be related to #1118. It seems that fontspec searches the system font cache when given a font by name.

rm-dr avatar Nov 18 '23 20:11 rm-dr