resume/raleway-font.sty

48 lines
2.3 KiB
TeX

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{raleway-font}[2021/05/30 Quick package to use Raleway 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/Raleway/}
\newcommand{\@fontName}{Raleway}
%------------------------------------------------------
% Command to select text - organized by increasing thickness
\newfontfamily{\customRalewayThin}[Path = \@fontFolder]{\@fontName-Thin}
\newfontfamily{\customRalewayExtraLight}[Path = \@fontFolder]{\@fontName-ExtraLight}
\newfontfamily{\customRalewayLight}[Path = \@fontFolder]{\@fontName-Light}
\newfontfamily{\customRalewayRegular}[Path = \@fontFolder]{\@fontName-Regular}
\newfontfamily{\customRalewayMedium}[Path = \@fontFolder]{\@fontName-Medium}
\newfontfamily{\customRalewaySemiBold}[Path = \@fontFolder]{\@fontName-SemiBold}
\newfontfamily{\customRalewayBold}[Path = \@fontFolder]{\@fontName-Bold}
\newfontfamily{\customRalewayExtraBold}[Path = \@fontFolder]{\@fontName-ExtraBold}
\newfontfamily{\customRalewayHeavy}[Path = \@fontFolder]{\@fontName-Heavy}
%------------------------------------------------------
\newcommand{\ralewayThin}[1]{\customRalewayThin\selectfont#1\normalfont}
\newcommand{\ralewayExtraLight}[1]{\customRalewayExtraLight\selectfont#1\normalfont}
\newcommand{\ralewayLight}[1]{\customRalewayLight\selectfont#1\normalfont}
\newcommand{\ralewayRegular}[1]{\customRalewayRegular\selectfont#1\normalfont}
\newcommand{\ralewayMedium}[1]{\customRalewayMedium\selectfont#1\normalfont}
\newcommand{\SemiBold}[1]{\customRaleway\selectfont#1\normalfont}
\newcommand{\ralewayBold}[1]{\customRalewayBold\selectfont#1\normalfont}
\newcommand{\ralewayExtraBold}[1]{\customRalewayExtraBold\selectfont#1\normalfont}
\newcommand{\ralewayHeavy}[1]{\customRalewayHeavy\selectfont#1\normalfont}
%------------------------------------------------------
% Set main fonts
\defaultfontfeatures{Mapping=tex-text}
\setsansfont[Scale=MatchLowercase, Path = \@fontFolder, BoldFont = \@fontName-SemiBold]{\@fontName-ExtraLight}
% \setmainfont[Color=primary, Path = \@fontFolder, BoldFont = \@fontName-Regular]{\@fontName-Light}