You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
resume/fontawesome.sty

77 lines
2.7 KiB

7 years ago
%% start of file `fontawesome.sty'.
%% Copyright 2013-2016 Xavier Danaux (xdanaux@gmail.com).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fontawesome}[2016/05/15 v4.6.3.1 font awesome icons]
%-------------------------------------------------------------------------------
% requirements
%-------------------------------------------------------------------------------
\RequirePackage{ifxetex,ifluatex}
\newif\iffontawesome@otf\fontawesome@otffalse
\ifxetex
\fontawesome@otftrue
\else
\ifluatex
\fontawesome@otftrue\fi\fi
%-------------------------------------------------------------------------------
% generic implementation
%-------------------------------------------------------------------------------
% generic command to display an icon by its name
\newcommand*{\faicon}[1]{%
{\csname faicon@#1\endcsname}}
% generic icon commands and aliases
\input{fontawesomesymbols-generic.tex}
%-------------------------------------------------------------------------------
% xe- and lualatex implementation
%-------------------------------------------------------------------------------
\iffontawesome@otf
\usepackage{fontspec}
% definition of \FA as a shortcut to load the Font Awesome font
\newfontfamily{\FA}{FontAwesome}
% icon-specific commands
\input{fontawesomesymbols-xeluatex.tex}
%-------------------------------------------------------------------------------
% (pdf)latex implementation
%-------------------------------------------------------------------------------
\else
% definition of \FA... as a shortcut to load the Font Awesome font
\DeclareRobustCommand\FAone{\fontencoding{U}\fontfamily{fontawesomeone}\selectfont}
\DeclareRobustCommand\FAtwo{\fontencoding{U}\fontfamily{fontawesometwo}\selectfont}
\DeclareRobustCommand\FAthree{\fontencoding{U}\fontfamily{fontawesomethree}\selectfont}
% icon-specific commands
\input{fontawesomesymbols-pdftex.tex}
\fi
%-------------------------------------------------------------------------------
% fix for FontAwesome icon names containing numerals
%-------------------------------------------------------------------------------
\renewcommand{\faHourglass}[1][]{%
\faicon{hourglass\if\relax\detokenize{#1}\relax\else-#1\fi}}
\renewcommand{\faBattery}[1][4]{%
\faicon{battery-#1}}
\endinput
%% end of file `fontawesome.sty'.