Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elken opened this issue Sep 21, 2023 · 6 comments

Comments

@elken
Copy link

elken commented Sep 21, 2023

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
Copy link
Author

elken commented Sep 21, 2023

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.

@vlasakm
Copy link
Contributor

vlasakm commented Sep 21, 2023

See here: #8 (comment).

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).

@elken
Copy link
Author

elken commented Sep 22, 2023

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

@ilyapopov
Copy link

ilyapopov commented Oct 8, 2023

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{...}

@elken
Copy link
Author

elken commented Oct 8, 2023

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

@rm-dr
Copy link
Contributor

rm-dr commented Nov 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants