[Tex/LaTex] Undefined control sequence in first line of fontspec.sty


I am creating a CV in LaTeX. The below code is a MWE (example.tex):

%%% ------------------------------------------------------------
\documentclass[paper=letterpaper,fontsize=10pt]{article}                % KOMA-article class

\usepackage{amsmath,amsfonts,amsthm}                    % Math packages
\usepackage{graphicx}                               % Enable pdflatex (had [pdftex])
\usepackage[svgnames]{xcolor}                           % Colors by their 'svgnames'
%   \textheight=700px                                   % Saving trees ;-) 
\usepackage{url}                                        % Clickable URL's
\usepackage{wrapfig}                                    % Wrap text along figures
\frenchspacing                                  % Better looking spacings after periods
\pagestyle{empty}                               % No pagenumbers/headers/footers

%%%%%%%%%%%%%%%%%%%%%%% FOR ICONS %%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fontspec}       %Github, mail, etc icons
\newfontfamily{\FA}[Path = fonts/]{fontawesome-webfont}

%%% Custom sectioning (sectsty package)
\usepackage{sectsty}                            % Custom sectioning (see below)
\sectionfont{%                                  % Change font of \section command
    \usefont{OT1}{phv}{b}{n}%                   % bch-b-n: CharterBT-Bold font

%%% Macros
\settowidth{\spacebox}{8888888888}              % Box to align text
\newcommand{\sepspace}{\vspace*{1em}}           % Vertical space macro


        \noindent \textbf{#1} \hfill                    % Study
            \hfill\color{White}#2}} \par                % Duration
        \textit{#3} \par        % School
        \normalsize \par}

        \noindent \textbf{#1} \hfill                    % Study
            \hfill\color{White}#2}} \par                % Duration
        \noindent \textit{#3} \par                  % School
         \noindent \small #4    % Description
        \normalsize \par}

%%% BEGIN DOCUMENT ------------------------------------------------------------

\noindent \colorbox{Black}{\parbox{4em} \hfill \color{White} \Huge \usefont{OT1}{phv}{b}{n} FIRST NAME}
\noindent \colorbox{Black}{\parbox{4em} \hfill \color{White} \Huge \usefont{OT1}{phv}{b}{n} LAST NAME}

%%%%%%%%%%%%%%%%%%%%%%% FOR ICONS %%%%%%%%%%%%%%%%%%%%%%%%%
Linux icon: \faLinux \\
StackExchange icon: \faSE \\
GitHub icon: \github \\
Skype icon: \faSkype

%%% Education ------------------------------------------------------------
\EdEntry{Ph.D. \hspace{1mm} Major: Major Name}{Then-Now}{\hspace{11.5mm} School Name}
\EdEntry{B.S. \hspace{4mm} Major: Major Name}{Then1-Then2}{\hspace{13.5mm} School Name}

%%% Research Experience --------------------------------------------------
\ResearchEntry{Job Title I}{Time I}{Place I}{Here I am describing my experience}
\ResearchEntry{Job Title II}{Time II}{Place II}{I will describe my experience here}

%%% References ------------------------------------------------------------
Available upon request

The CV can be generated using "pdflatex example.tex" as long as two blocks of lines (15-21 and 63-66) are commented out. In the example above, these blocks are surrounded by comment signs with the term "FOR ICONS".

I am trying to add a few symbols to my CV (GitHub, Skype, etc). These symbols are from the FontAwesome package. All the code related to adding these symbols is in the previously-mentioned two line blocks. Hence, these two line-blocks are causing the problem.

When I try to run "xelatex example.tex", I get an error:

! Undefined control sequence.
l.1 {\rtf

When I look in my fontspec.sty script (located in /usr/local/texlive/2014/texmf-dist/tex/latex/fontspec/), I see that the undefined control sequence is the first line.

I should say that I created the fontspec.sty file by copy-pasting everything from this link (http://chocolatshalba.ch/files/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty) into a text file, and saving it as .sty into the directory shown above.

I have been working on this problem for several hours, and am at a loss. You may gather that I am not too familiar with how the .sty files work! Thank you for any advice; it might help me get a job!…

Best Answer

It is not really a direct answer to your question, but you can access the icons of FontAwesome directly with the package fontawesome you are loading. Just the macro names are partly different.

%%%%%%%%%%%%%%%%%%%%%%% FOR ICONS %%%%%%%%%%%%%%%%%%%%%%%%%
Linux icon: \faLinux \\
StackExchange icon: \faStackExchange \\
GitHub icon: \faGithub \\
Skype icon: \faSkype

Loading the font manually via fontspec and creating macros is redundant. So just remove the lines 16-21, use the right macro names and you should be fine.