summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontawesome/fontawesome.sty
blob: 22cafcddd7c02bf6c020c369d8ddda164ddd6e47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%% start of file `fontawesome.sty'.
%% Copyright 2013-2015 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}[2015/07/30 v4.4.0 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


\endinput


%% end of file `fontawesome.sty'.