Discussion:
Fontname with a slash using XeLaTeX/fontspec
(too old to reply)
Ulrich D i e z
2024-02-25 00:58:39 UTC
Permalink
Is there a way to allow fontspec to load a font whose name contains an embedded slash?
On my system, TeX Live 2020 on Debian Buster, copying AnkaCoder-C75-r.ttf to
the directory where the .tex-file to compile is stored and saying

\setmonofont{AnkaCoder-C75-r.ttf}

works out both with lualatex and xelatex.

On my system, TeX Live 2020 on Debian Buster, after moving the .ttf-files to
'/usr/share/fonts/truetype/AnkaCoder'
and running
sudo luaotfload-tool -vvv --update --force
and
sudo mktexlsr

, compiling

\documentclass{article}
\usepackage{fontspec}
\setmonofont{AnkaCoder-C75-r}
%\setmonofont{AnkaCoder-C75-r.ttf}[Path=/usr/share/fonts/truetype/AnkaCoder/]
\begin{document}
text
\begin{verbatim}
stuff
\end{verbatim}
\end{document}

works out using xelatex for compiling but fails when using lualatex for
compiling.

With lualatex I don't get any error messages from the package fontspec.
But at the end of the lualatex-run I get the message:

! error: (file ) (type 2): cannot find file ''
! ==> Fatal error occurred, no output PDF file produced!

All this is what in fontspec is called "loading by filename".

Loading by fontname doesn't work out at all both with lualatex and xelatex.

I don't know whether this might be a bug in fontspec or in luatex
or whatever.

But the system where I tested these things is rather old.

Sincerely

Ulrich
Peter Flynn
2024-02-28 10:49:58 UTC
Permalink
Post by Ulrich D i e z
Is there a way to allow fontspec to load a font whose name contains an embedded slash?
On my system, TeX Live 2020 on Debian Buster, copying AnkaCoder-C75-r.ttf to
the directory where the .tex-file to compile is stored and saying
\setmonofont{AnkaCoder-C75-r.ttf}
Thanks very much. I'll mark it as an exception.

Peter

Loading...