[XeTeX] asterisk in font name - font error
Ulrike Fischer
news3 at nililand.de
Mon Dec 14 16:42:13 CET 2020
Am Sun, 13 Dec 2020 17:01:16 +0100 schrieb Carlos Franke:
> This would be a neat workaround. However it doesn't compile on my
> system either. Running "xelatex temp2.tex" (temp2.tex being Apostolos'
> code, only with Minion Pro replaced with another font as I don't have
> Minion Pro installed) I get a similar error as before:
>
> [...]
>
> (./temp2.aux) (/usr/share/texlive/texmf-
> dist/tex/latex/base/ts1cmr.fd)kpathsea:make_tex: Invalid filename
> `[Jost-500-Medium.otf]/OT', contains '['
>
>
> ! Package fontspec Error: The font "Jost-500-Medium" cannot be
> found.
>
>
> I am likely making some very basic mistake. I would be grateful for any
> hint.
I wouldn't use xltxtra, and the Mapping is unneeded too, but beside
this it should work.
\documentclass{article}
\usepackage{fontspec}
\setsansfont{Jost-500-Medium.otf}[
BoldFont = Jost-700-Bold.otf ,
ItalicFont = Jost-500-MediumItalic.otf,
BoldItalicFont = Jost-700-BoldItalic.otf]
\begin{document}
\LARGE
\sffamily this is an example \textit{italics}, \textbf{bold},
and \textbf{\textit{bold italics}}.
\end{document}
If you get an error with this the fonts are perhaps not correctly
installed. Where did you put them? Did you really installed the otf?
(the repo seems to provide also ttf.)
Try also to compile with lualatex, it is normally less picky
regarding fonts (and one can inspect the names.lua).
>
> Be that as it may, I am wondering: Should xelatex ideally work with the
> font name "Jost*" like it does with "Minion Pro" and others?
Exotic names can always be problematic. And * has the meaning of a
wildcard in various places. I prefer to stick to file names.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
More information about the XeTeX
mailing list.