\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lato-font}[2021/05/30 Quick package to use the Lato fonts]

%------------------------------------------------------
% Package Imports
% Set up fonts
\RequirePackage{fontspec,xltxtra,xunicode,fontenc}
% used to set the color of text
\RequirePackage{font-color}

%------------------------------------------------------
% Set up font options
\newcommand{\fontFolder}{fonts/Lato/}
\newcommand{\fontName}{Lato}

%------------------------------------------------------
% Command to select text
\newfontfamily{\customLatoThin}[Path = \fontFolder]{\fontName-Thin}
\newfontfamily{\customLatoLight}[Path = \fontFolder]{\fontName-Light}
\newfontfamily{\customLatoRegular}[Path = \fontFolder]{\fontName-Regular}
\newfontfamily{\customLatoBold}[Path = \fontFolder]{\fontName-Bold}
\newfontfamily{\customLatoBlack}[Path = \fontFolder]{\fontName-Black}

\newfontfamily{\customLatoThinItalic}[Path = \fontFolder]{\fontName-ThinItalic}
\newfontfamily{\customLatoLightItalic}[Path = \fontFolder]{\fontName-LightItalic}
\newfontfamily{\customLatoItalic}[Path = \fontFolder]{\fontName-Italic}
\newfontfamily{\customLatoBoldItalic}[Path = \fontFolder]{\fontName-BoldItalic}
\newfontfamily{\customLatoBlackItalic}[Path = \fontFolder]{\fontName-BlackItalic}

%------------------------------------------------------
\newcommand{\latoThin}[1]{\customLatoThin\selectfont#1\normalfont}
\newcommand{\latoLight}[1]{\customLatoLight\selectfont#1\normalfont}
\newcommand{\latoRegular}[1]{\customLatoRegular\selectfont#1\normalfont}
\newcommand{\latoBold}[1]{\customLatoBold\selectfont#1\normalfont}
\newcommand{\latoBlack}[1]{\customLatoBlack\selectfont#1\normalfont}

\newcommand{\latoThinItalic}[1]{\customLatoThinItalic\selectfont#1\normalfont}
\newcommand{\latoLightItalic}[1]{\customLatoLightItalic\selectfont#1\normalfont}
\newcommand{\latoItalic}[1]{\customLatoItalic\selectfont#1\normalfont}
\newcommand{\latoBoldItalic}[1]{\customLatoBoldItalic\selectfont#1\normalfont}
\newcommand{\latoBlackItalic}[1]{\customLatoBlackItalic\selectfont#1\normalfont}


%------------------------------------------------------
% Set main fonts
\defaultfontfeatures{Mapping=tex-text}
% \setsansfont[Color=primary, Path = \fontFolder, BoldItalicFont=\fontName-Italic,BoldFont=\fontName-Regular,ItalicFont=\fontName-LightItalic]{\fontName-Light}
% \setsansfont[Color=primary, Path = \fontFolder, BoldItalicFont=\fontName-BoldItalic,BoldFont=\fontName-Bold,ItalicFont=\fontName-Italic]{\fontName-Regular}
\setmainfont[Color=primary, Path = \fontFolder, BoldItalicFont=\fontName-Italic,BoldFont=\fontName-Regular,ItalicFont=\fontName-LightItalic]{\fontName-Light}

% \setmainfont[Color=primary, Path = \fontFolder, BoldItalicFont=\fontName-BoldItalic,BoldFont=\fontName-Bold,ItalicFont=\fontName-Italic]{\fontName-Regular}
