tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

Tectonic doesn't support woff2 format fonts

Open sftse opened this issue 4 months ago • 3 comments

I'm using the current 0.15.0 package from the Nix store and a document fails with

error: Cannot proceed without the font: /nix/store/k090.....montserrat-9.000/share/fonts/woff2/Montserrat-LightItalic.woff2

Looking at the offending function causing the error, the checks directly prior to the abort https://github.com/tectonic-typesetting/tectonic/blob/09b1c14e89a8f2cf0c5b6d4bfb08fde07caa2725/crates/pdf_io/pdf_io/dpx-dvi.c#L1135-L1142 seem to hint at this function not expecting .woff2 paths to be passed to it?

The file does exist at the location.

sftse avatar Aug 19 '25 14:08 sftse

Minimal example

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Montserrat}

\begin{document}
Text
\end{document}

sftse avatar Aug 19 '25 14:08 sftse

The version of XeTeX Tectonic uses as a backend doesn't support woff/woff2 font files. There are workarounds to make freetype not list them, so if other formats exist they will be used. If you need woff2 support specifically though, Tectonic can't do it currently.

CraftSpider avatar Aug 19 '25 22:08 CraftSpider

Thanks, there are alternative .ttf fonts available, this fixed the problem.

sftse avatar Aug 20 '25 08:08 sftse