With XeLaTeX or LuaLaTeX, a command such as \faBook
gets translated into \faicon{book}
, with a predefined table; so what we want to change is the action of \faicon
, which by default is
\newcommand*{\faicon}[1]{{\csname faicon@#1\endcsname}}
Just change this into
\renewcommand*{\faicon}[1]{{\makebox[1.5em][c]{\csname faicon@#1\endcsname}}
I'm afraid you will have to adjust visually the fixed width depending on the widest icon you need to print.
\documentclass{article}
\usepackage{fontspec}
\usepackage{fontawesome}
\renewcommand*{\faicon}[1]{\makebox[1.5em][c]{\csname faicon@#1\endcsname}}
\begin{document}
\section{\faGraduationCap \textbackslash faGraduationCap}
\section{\faBook \textbackslash faBook}
\faGraduationCap \textbackslash faGraduationCap\par\noindent
\faBook \textbackslash publications
\end{document}

You can add an optional alignment argument to all fontawesome
commands. The \ignorespaces
makes the commands ignore a following space even if present, so
\faBook Publications
\faBook[r] Publications
are the same as
\faBook Publications
\faBook[r]Publications
and you don't need to worry about spaces if you add the optional argument.
\documentclass{article}
\usepackage{fontspec}
\usepackage{fontawesome}
\usepackage{xparse}
\RenewDocumentCommand{\faicon}{mO{c}}{%
\makebox[1.5em][#2]{\csname faicon@#1\endcsname}\ignorespaces
}
\begin{document}
\section{\faGraduationCap \textbackslash faGraduationCap}
\section{\faBook \textbackslash faBook}
\faGraduationCap \textbackslash faGraduationCap\par\noindent
\faBook \textbackslash publications
\noindent
\vrule\faGraduationCap\vrule\faBook\vrule \\
\vrule\faGraduationCap[l]\vrule\faBook[l]\vrule \\
\vrule\faGraduationCap[r]\vrule\faBook[r]\vrule
\end{document}
