In order to specify the sans serif font in report I am successfully using the following and all of the font shapes are being reproduced in the pdf without warning.
\setsansfont[Path = fonts/Lato2OFL/,
UprightFont = Lato-Regular.ttf,
BoldFont = Lato-Bold.ttf,
ItalicFont = Lato-Italic.ttf,
BoldItalicFont = Lato-BoldItalic.ttf]{Lato}
However, in the table of contents I would like to use the 'Light' variant of this font. I was hoping that doing the following would do the trick:
\fontspec[Path = fonts/Lato2OFL/,
UprightFont = Lato-Light.ttf,
ItalicFont = Lato-LightItalic.ttf,
BoldFont = Lato-Regular.ttf,
BoldItalicFont = Lato-Italic.ttf
]{Lato-Light}\tableofcontents
Assuming that Latex would use the font files that I specify for each of the fonts that it may need. Note that I thought it would be nice to use the 'Lato-Regular' for a 'boldish' font in the text that is otherwise 'Light' But I get the warning:
LaTeX Font Warning: Font shape `EU2/Lato-Light.ttf(0)/bx/n' undefined
(Font) using `EU2/Lato-Light.ttf(0)/m/n' instead on input
line 12.
and the bold font is replaced by the thin upright font ie. 'no bold'. I think I am missing something fundamentally about specifying fonts in LaTeX because it seems that it is looking for a bold font in the Lato-Light family, but I just want it to use the file I asked it to use.