<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% Copyright 2025 Daniel Nagel
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is Daniel Nagel
%
\@ifpackageloaded{fontawesome6}{}{\PackageError{fontawesome6-utex-helper}{This package should not be loaded individually. Load fontawesome6 instead.}{}}
\@ifpackagelater{expl3}{2017/05/26}{}{
  \def\faV@extractversion#1 #2\|{#1}
  \PackageError{fontawesome6}{expl3 package version too old}{%
    The fontawesome6 package requires an up-to-date version of the\MessageBreak
    package expl3, which is part of the l3kernel bundle. I could only\MessageBreak
    find version \expandafter\expandafter\expandafter\faV@extractversion\csname ver@expl3.sty\endcsname{} \|, so I will exit now.
    To fix this error,\MessageBreak you have to update l3kernel to version 2017-05-26 or later.
  }
  \endinput
}

\ProvidesExplPackage{fontawesome6-utex-helper}{2025/05/03}{6.7.2-2}{uTeX helper for fontawesome6}

\sys_if_engine_luatex:TF{
  \RequirePackage{luatexbase}
  \directlua{require('fontawesome6')}

  \cs_new:Nn\__fontawesome_analyze_font:nn{
    \group_begin:
      \usefont{TU}{fontawesome6#1}{#2}{n}
      \lua_now:e{fontawesome6_analyze_current_font(\tex_fontid:D\tex_font:D)}
    \group_end:
  }
  \cs_set:Npn \__fontawesome_glyphindex:n {
    \lua_now:e{tex.sprint(font.getfont(font.current()).resources.unicodes[token.scan_string()]~or~0)}
  }
  \cs_set_eq:NN\__fontawesome_glyph:w\tex_char:D
}{
  \cs_new:Nn\__fontawesome_analyze_font:nn{
    \group_begin:
      \usefont{TU}{fontawesome6#1}{#2}{n}
      \int_step_inline:nnnn{67}1{\tex_XeTeXcountglyphs:D \tex_font:D - 1} {
        \tl_set:No\l_tmpa_tl{\tex_XeTeXglyphname:D \tex_font:D ##1}
        \tl_set:NV\l_tmpb_tl\l_tmpa_tl
        \tl_put_left:No\l_tmpb_tl{\char_generate:nn{92}{12}fa-}
        \tl_replace_all:Nnn\l_tmpb_tl{-}{\str_upper_case:n}
        \tl_set_rescan:Nnx\l_tmpb_tl{\ExplSyntaxOn}{\l_tmpb_tl}
        \exp_last_unbraced:NV\cs_gset:Npx\l_tmpb_tl{\exp_not:N\faPreselectedIcon{\l_tmpa_tl}}
      }
    \group_end:
  }
  \cs_set:Nn\__fontawesome_glyphindex:n{
    \the\tex_XeTeXglyphindex:D"#1"\scan_stop:
  }
  \cs_set_eq:NN\__fontawesome_glyph:w\tex_XeTeXglyph:D
}
\__fontawesome_analyze_font:nn{\c__fontawesome_kind_tl}{solid}
\__fontawesome_analyze_font:nn{brands}{regular}

\bool_new:N \l__fontawesome_duotone_bool
\tl_new:N \l_fontawesome_duotone_secondary_style_tl
\tl_set:Nn \l_fontawesome_duotone_secondary_style_tl { \color{.!30!white} }

\cs_new:Nn\fontawesome_use_icon:nn{
  \group_begin:
    \usefont
      {TU}
      {fontawesome6\c__fontawesome_kind_tl}
      {#1}
      {n}
    \bool_set:Nn \l__fontawesome_duotone_bool {
      \str_if_eq_p:ee {#1} {duotone-solid}
      || \str_if_eq_p:ee {#1} {duotone-regular}
      || \str_if_eq_p:ee {#1} {duotone-light}
      || \str_if_eq_p:ee {#1} {duotone-thin}
      || \str_if_eq_p:ee {#1} {sharp-duotone-solid}
      || \str_if_eq_p:ee {#1} {sharp-duotone-regular}
      || \str_if_eq_p:ee {#1} {sharp-duotone-light}
      || \str_if_eq_p:ee {#1} {sharp-duotone-thin}
    }
    \int_set:Nn\l_tmpa_int{
      \__fontawesome_glyphindex:n{
        #2
        \bool_if:NT \l__fontawesome_duotone_bool { -primary }
      }
    }
    \int_compare:nNnT{\l_tmpa_int}={0}{
      \fontseries{solid}
      \selectfont
      \int_set:Nn\l_tmpa_int{\__fontawesome_glyphindex:n{#2}}
      \int_compare:nNnTF{\l_tmpa_int}={0}{
        \fontfamily{fontawesome6brands}
        \fontseries{regular}
        \selectfont
        \int_set:Nn\l_tmpa_int{\__fontawesome_glyphindex:n{#2}}
        \int_compare:nNnT{\l_tmpa_int}={0}{
          \msg_error:nnxx{fontawesome6}{icon-not-found}{#2}{#1}
        }
      }{
        \msg_warning:nnxx{fontawesome6}{style-substitution}{#2}{#1}
      }
    }
    \bool_if:NTF\c__fontawesome_fixed_bool{
      \makebox[1.5em][c]
    }{
      \use:n
    }
    {
      \bool_if:NTF \l__fontawesome_duotone_bool {
        \__fontawesome_glyph:w \l_tmpa_int
        \int_set:Nn\l_tmpa_int{ \__fontawesome_glyphindex:n{ #2-secondary } }
        \int_compare:nNnF { \l_tmpa_int } = { 0 } {
          \llap {
            \l_fontawesome_duotone_secondary_style_tl
            { \__fontawesome_glyph:w \l_tmpa_int }
          }
        }
        % \ooalign {
        %   \hss \__fontawesome_glyph:w \l_tmpa_int \hssÂ&nbsp;\cr
        %   \hss
        %   \int_set:Nn\l_tmpa_int{ \__fontawesome_glyphindex:n{ #2-secondary } }
        %   \int_compare:nNnF { \l_tmpa_int } = { 0 } {
        %     \color{gray}\__fontawesome_glyph:w \l_tmpa_int
        %   }
        %   \hssÂ&nbsp;\cr
        % }
      } {
        \__fontawesome_glyph:w \l_tmpa_int
      }
    }
  \group_end:
}

\NewDocumentCommand \faDuotoneSetSecondary { m } {
  \tl_set:Nn \l_fontawesome_duotone_secondary_style_tl { #1 }
}
</pre></body></html>