tectonic
tectonic copied to clipboard
Error building document dependent on FontAwesome
Running tectonic to produce a build of my CV fails with the following output:
$ tectonic CV.tex
Running TeX ...
error: fontawesome.sty:46: Package fontspec Error: The font "FontAwesome" cannot be found.
For immediate help type H <return>
error: halted on potentially-recoverable error as specified
The default bundle found in archive.org that tectonic points to does seem to contain FontAwesome.otf, so I'm not sure why the build fails...
Edit: I am using tectonic 0.7.0
Thanks for reporting! The issue might be as simple as the font specification requiring a .otf extension ... if you can post a minimal example that demonstrates the error, that would be helpful, but my guess is that a \usepackage{fontawesome} will be all that it takes.
Thanks for reporting! The issue might be as simple as the font specification requiring a
.otfextension ... if you can post a minimal example that demonstrates the error, that would be helpful, but my guess is that a\usepackage{fontawesome}will be all that it takes.
Correct. Here's a snippet:
...
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{fontawesome}
...
\faStar
Just wanted to note that a temporary solution for this is to install FontAwesome on the system.
See also #157, I had forgotten about that one.
Some quick notes-to-self on this:
The key routine is find_native_font. For a minimal example the usages are:
Breakpoint 2, find_native_font (uname=0x55555738ea00 "[lmroman10-regular]:mapping=tex-text;", scaled_size=655360)
Breakpoint 2, find_native_font (uname=0x55555737ea00 "[lmroman10-bold]:mapping=tex-text;", scaled_size=655360)
Breakpoint 2, find_native_font (uname=0x555557d9baa0 "FontAwesome", scaled_size=655358) at xetex/xetex-ext.c:713
The bracketed versions search for specific files; the non-bracketed FontAwesome version ends up invoking XeTeXFontMgr::findFont. This doesn't seem to try to open any files by name.
See this comment — this should be fixed the next time I release an updated bundle. In the meantime, the workaround is pretty straightforward.
\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faStar
\end{document}
Thanks to the workaround, this works in the latest release. So the issue can be closed I think.
For future reference, see also #157 and #9 which is the crux of the issue.