Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building document dependent on FontAwesome #801

Closed
sug0 opened this issue Jul 1, 2021 · 7 comments
Closed

Error building document dependent on FontAwesome #801

sug0 opened this issue Jul 1, 2021 · 7 comments

Comments

@sug0
Copy link

sug0 commented Jul 1, 2021

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

@pkgw
Copy link
Collaborator

pkgw commented Jul 2, 2021

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.

@sug0
Copy link
Author

sug0 commented Jul 2, 2021

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.

Correct. Here's a snippet:

...
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{fontawesome}
...
\faStar

@sug0
Copy link
Author

sug0 commented Jul 6, 2021

Just wanted to note that a temporary solution for this is to install FontAwesome on the system.

@pkgw
Copy link
Collaborator

pkgw commented Jul 6, 2021

See also #157, I had forgotten about that one.

@pkgw
Copy link
Collaborator

pkgw commented Jul 8, 2021

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.

@pkgw
Copy link
Collaborator

pkgw commented Sep 10, 2022

See this comment — this should be fixed the next time I release an updated bundle. In the meantime, the workaround is pretty straightforward.

@vlasakm
Copy link
Contributor

vlasakm commented Dec 13, 2022

\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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants