You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compile a LaTeX document using the typeface "Jost*" (with an asterisk in the name) fails with:
tex: Invalid filename `JostJost*/OT:script=latn;language=dflt;', contains '*'
! Package fontspec Error: The font "JostJost*" cannot be found.
Discussion on the XeTeX mailing list arrived at the suggestion that this could be a bug in fontspec. (Probably not one in latex2e.) This bug report is mostly a summary of what has been discussed on the mailing list so far.
Check/indicate
Relevant for XeTeX
[ ? ] Relevant for LuaTeX
Issue tracker has been searched for similar issues?
Links to <tex.stackexchange.com> discussion if appropriate
Minimal example demonstrating the issue
\documentclass{article}
\usepackage{fontspec}
\setsansfont{Jost*}
\begin{document}
\LARGE
\sffamily this is an example \textit{italics}, \textbf{bold},
and \textbf{\textit{bold italics}}.
\end{document}
Further details
To get the fonts for testing: The free version of the Jost* fonts can be downloaded by selecting to pay zero dollars on the download page.
The fonts can be referred by file name without issue:
\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}
xetex (not xelatex) does not have this problem. There the Jost* typefacwe can accessed by family name, not only file name.
As a workaround, the asterisk can be deleted from the fonts' family name, e.g. using a short fontforge script:
import fontforge
import sys
for fontname in sys.argv[1:]:
font = fontforge.open(fontname)
font.familyname = "Jost"
font.generate(fontname+"-starless.otf")
After installing the newly created "starless" fonts and referring to them by "Jost" (without asterisk) from LaTeX, the test file is compiled correctly and without issue.
The text was updated successfully, but these errors were encountered:
fontspec uses * as a way to abbreviate font names. I didn't think anyone would define a font name using it. I'll keep this open to consider adding a "NoStar" feature to disable that behaviour.
I've tried to fix this and unless I'm missing something obvious I think LaTeX itself is also struggling with the star in the name of the font. I won't close this yet but I don't think this is a simple one. For anyone reading, suggest loading the font by filename instead!
Description
Trying to compile a LaTeX document using the typeface "Jost*" (with an asterisk in the name) fails with:
Discussion on the XeTeX mailing list arrived at the suggestion that this could be a bug in fontspec. (Probably not one in latex2e.) This bug report is mostly a summary of what has been discussed on the mailing list so far.
Check/indicate
[ ? ] Relevant for LuaTeX
Minimal example demonstrating the issue
Further details
To get the fonts for testing: The free version of the Jost* fonts can be downloaded by selecting to pay zero dollars on the download page.
The fonts can be referred by file name without issue:
xetex (not xelatex) does not have this problem. There the Jost* typefacwe can accessed by family name, not only file name.
As a workaround, the asterisk can be deleted from the fonts' family name, e.g. using a short fontforge script:
After installing the newly created "starless" fonts and referring to them by "Jost" (without asterisk) from LaTeX, the test file is compiled correctly and without issue.
The text was updated successfully, but these errors were encountered: