Closed kozross closed 3 years ago
Do you have FontAwesome installed?
The only thing called FontAwesome I have in my distro's package manager is an .sty, which I assume Tectonic should pull down.
No, you'll need a .otf or a .ttf installed... Does this work without tectonic?
@HaoZeke: Yes, it can be built using TeXLive with latexmk
. fontawesome
is a LaTeX package which TeXLive contains.
I ran into the same problem. The casual
style of moderncv
depends on FontAwesome
being locally installed. On my ubuntu machine, I could install it through sudo apt install fonts-font-awesome
. I also run tectonic
through a docker image, so I had to mount my /usr/share/fonts
folder into the docker image.
You may also need to reload your font-cache after installing the font.
@thomaseizinger Perhaps, but the fact is that it does work with TeXLive, or at least it did in my case. I certainly didn't locally install anything like FontAwesome, and I'm not sure if Gentoo even packages it.
@kozross Did you check if the resulting PDF had the actual FontAwesome icons in it? Maybe some kind of fallback was selected on your local installation?
Also, if you installed the full TeXLive package, it may have come as a peer-dependency.
I just found and installed Font Awesome. This is the list of files the Gentoo package in question contains:
[koz@Sebastian downloads]$ equery f fontawesome
* Searching for fontawesome ...
* Contents of media-fonts/fontawesome-5.1.0:
/usr
/usr/share
/usr/share/fonts
/usr/share/fonts/fontawesome
/usr/share/fonts/fontawesome/Font Awesome 5 Brands-Regular-400.otf
/usr/share/fonts/fontawesome/Font Awesome 5 Free-Regular-400.otf
/usr/share/fonts/fontawesome/Font Awesome 5 Free-Solid-900.otf
/usr/share/fonts/fontawesome/encodings.dir
/usr/share/fonts/fontawesome/fa-brands-400.ttf
/usr/share/fonts/fontawesome/fa-regular-400.ttf
/usr/share/fonts/fontawesome/fa-solid-900.ttf
/usr/share/fonts/fontawesome/fonts.dir
/usr/share/fonts/fontawesome/fonts.scale
I then ran fc-cache
to reload the font cache. Tried to compile the given example with Tectonic again - still same error.
FYI, I have an actual FontAwesome.otf
file installed. I am not aware on the details about the font resolution works but maybe you need some kind of alias so that the font can be found as FontAwesome
?
➜ ~ fc-list | grep -i FontAwesome
/usr/share/fonts/opentype/font-awesome/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/woff/font-awesome/fontawesome-webfont.woff: FontAwesome:style=Regular
/usr/share/fonts/truetype/font-awesome/fontawesome-webfont.ttf: FontAwesome:style=Regular
Perhaps. For reference, this is the result of ``fc-list | grep -i FontAwesome' for me:
/usr/share/fonts/fontawesome/fa-regular-400.ttf: Font Awesome 5 Free:style=Regular
/usr/share/fonts/fontawesome/fa-brands-400.ttf: Font Awesome 5 Brands:style=Regular
/usr/share/fonts/fontawesome/Font Awesome 5 Free-Solid-900.otf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid
/usr/share/fonts/fontawesome/fa-solid-900.ttf: Font Awesome 5 Free:style=Solid
/usr/share/fonts/fontawesome/Font Awesome 5 Brands-Regular-400.otf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/usr/share/fonts/fontawesome/Font Awesome 5 Free-Regular-400.otf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
I had the same issue, but it seems that this is an issue with fontawesome.sty
package — it only supports Font Awesome version 4. Version 5 was released AFAIR ~1 year ago and most distros already package version 5, which uses different naming convention for font files. There is a fontawesome5
package by the same author, but moderncv
will probably always stay on fontawesome
& 4th version of Font Awesome.
For Arch the fix was to uninstall otf-font-awesome
official package which packages version 5, and install ttf-font-awesome-4
which packages version 4.
@jmatraszek fix for Arch worked for me, too!
OK, I'm gonna close this issue since it sounds like it doesn't call for any changes in Tectonic. Thanks for everyone's comments!
For Fedora I just had to install texlive-fontawesome
to make it work.
I just don’t get why we need the font on the local machine. Why tectonic
doesn’t download it for us?
@batisteo It shouldn't be necessary, but if there's a bug in the way that the bundle is put together, it may help to install fonts on the local system. The current default bundle includes the following files with "fontawesome" in their names:
FontAwesome--fontawesomeone.tfm
FontAwesome--fontawesomethree.tfm
FontAwesome--fontawesometwo.tfm
FontAwesome.otf
FontAwesome.pfb
FontAwesome5Brands-Regular-400.otf
FontAwesome5Brands-Regular.pfb
FontAwesome5Free-Regular-400.otf
FontAwesome5Free-Regular.pfb
FontAwesome5Free-Solid-900.otf
FontAwesome5Free-Solid.pfb
fontawesome.sty
fontawesome5-generic-helper.sty
fontawesome5-mapping.def
fontawesome5-utex-helper.sty
fontawesome5.sty
fontawesomeone.enc
fontawesomesymbols-generic.tex
fontawesomesymbols-pdftex.tex
fontawesomesymbols-xeluatex.tex
fontawesomethree.enc
fontawesometwo.enc
lwarp-fontawesome.sty
lwarp-fontawesome5.sty
tufontawesomebrands.fd
tufontawesomefree.fd
tufontawesomepro.fd
ufontawesomebrands0.fd
ufontawesomebrands1.fd
ufontawesomefree0.fd
ufontawesomefree1.fd
ufontawesomefree2.fd
ufontawesomefree3.fd
ufontawesomeone.fd
ufontawesomethree.fd
ufontawesometwo.fd
So I would hope that with a patch this could maybe work without needing to install any system fonts. (This would be a bug associated with the tectonic-texlive-bundles
repo.)
I had the same issue, but it seems that this is an issue with
fontawesome.sty
package — it only supports Font Awesome version 4. Version 5 was released AFAIR ~1 year ago and most distros already package version 5, which uses different naming convention for font files. There is afontawesome5
package by the same author, butmoderncv
will probably always stay onfontawesome
& 4th version of Font Awesome.For Arch the fix was to uninstall
otf-font-awesome
official package which packages version 5, and installttf-font-awesome-4
which packages version 4.
I'm on Arch aswell, unfortunately this didn't work for me. What worked though was adding a path to your fontawesome.sty (which is e.g. provided with https://github.com/posquit0/Awesome-CV) by editing the \newfontfamily
command to look for the font directly like so: \newfontfamily{\FA}[Path = fonts/]{FontAwesome}
. Provided that your FontAwesome.ttf is in a subfolder fonts/ relative to the texfile you are compiling. You could also try entering an absolute path to your systems font directories.
I'm facing the same issue when compiling on macOS Monterey by Tectonic 0.9.0
.
OK, in https://github.com/tectonic-typesetting/tectonic-texlive-bundles/pull/10 I have finally added a patch to fontawesome.sty
to fix the loading issue in future editions of the Tectonic bundle.
Until that bundle comes out, you should be able to work around this problem by saving this patched version of fontawesome.sty alongside your document source code. All it does is add a .otf
extension to the \newfontfamily
command.
Note also that if you're using TeXLive 2021, it looks like the latest version of moderncv
uses the fontawesome5
package which avoids this issue.
Just to link the issues: I am fairly sure the crux of this issue is #9.
This is what I get in the terminal when I try:
Example in question (download link).