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

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.

closed as unclear what you're asking by TeXnician, Stephen, Troy, Mensch, Sebastiano Jan 3 at 20:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    tex.stackexchange.com/a/264275/7883 will help you. – Thérèse Jun 3 '16 at 15:14
  • Thank you for the reply, The information on the page that you link to is very useful, however the strategy did not fix my problem. I ended up ignoring the warning and allowing the replacement of the bx/n font with the upright font of that family. – trosendal Jun 30 '16 at 6:02

Browse other questions tagged or ask your own question.