forked from Aarif123456/modern-deedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lato-font.sty
51 lines (42 loc) · 2.75 KB
/
lato-font.sty
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
\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}