I am trying to use FontAwesome in XeLaTex on OS X. So I followed the steps described on this github:
So that the beginning of my .tex file look like this:
\documentclass{.......}
\usepackage{fontspec}
\usepackage{fontawesome}
\newfontfamily{\FA}{FontAwesome Regular}
\begin{document}
But I keep getting this error:
kpathsea:make_tex: Invalid fontname `FontAwesome Regular', contains ' '
kpathsea:make_tex: Invalid fontname `FontAwesome Regular', contains ' '
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "FontAwesome Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
It seems like it is not finding the font. After some research, I tried loading the font with:
\defaultfontfeatures{
Path = /usr/local/texlive/2013/texmf-dist/fonts/opentype/public/fontawesome/ }
\usepackage{fontawesome}
instead of \newfontfamily{\FA}{FontAwesome Regular} but it was not working either.
I am still new with LaTex and I do appreciate your time, thank you
Add Font Awesome Files to Your Project Be sure to include the core styling file - /css/fontawesome.css - as well as the CSS files for any individual styles you want to use, and you can remove any .css and web font files you don't plan on using.
Once download the font file from FontAwesome and install to be system font, open the font application and confirm the FontAwesome name.
Due to FontAwesome version is 5.7.2 at this time, this version has three font type in system font.
Their names are
Font Awesome 5 Free Regular
Font Awesome 5 Free Solid
Font Awesome 5 Brands Regular
So define command for FontAwesome:
\newfontfamily{\FAFR}{Font Awesome 5 Free Regular}
\newfontfamily{\FAFS}{Font Awesome 5 Free Solid}
\newfontfamily{\FAB}{Font Awesome 5 Brands Regular}
Simply redefine:
\def\faEmail{{\FAFR \symbol{"F0E0}}} % Email
\def\faPhone{\FAFS \symbol{"F095}} % Phone
\def\faLinkedin{\FAB \symbol{"F08C}} % Linkedin
\def\faGithub{\FAB \symbol{"F09B}} % Github
\def\faStackOverflow{\FAB \symbol{"F16C}} % StackOverflow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With