I cannot change LetterSpacing when using a newfontfamily with lualatex

I'm using Montserrat as a custom font for my latex document and I would like to change the font weight and letter spacing for my text. I've figured out how to change the font weight and change the letter spacing but if I'm doing both at the same time the letter spacing does not change. I'm using lualatex to compile, here is some code to illustrate my issue

\documentclass{article}

\usepackage{fontspec}

\setmainfont{Montserrat}
\newfontfamily{\thin}{Montserrat Thin}
\newfontfamily{\extralight}{Montserrat Extra light}
\newfontfamily{\light}{Montserrat Light}
\newfontfamily{\medium}{Montserrat Medium}
\newfontfamily{\semibold}{Montserrat Semi Bold}
\newfontfamily{\bold}{Montserrat Bold}
\newfontfamily{\extrabold}{Montserrat Extra bold}
\newfontfamily{\black}{Montserrat Black}

\begin{document}

{
\begin{center}
\Huge
\thin
The quick brown fox jumped over the lazy dogs.
\end{center}
}

\end{document}



I'm pretty new to latex so I would not be surprised if I'm doing something wrong. If anyone can help me solve my current issue or show me how to "properly" change font properties like these it would be greatly appreciated.

• What I understand from the documentation of \addfontfeatures is that, it only affects the current font family, while the font family is changed by \thin. – muzimuzhi Z Aug 5 '20 at 17:11
• @muzimuzhiZ Wow, your comment put me in the right direction. I just added it after \thin and it worked lol. Can't belive it was that simple, thank you. – brw.064 Aug 5 '20 at 17:22

According to the documentation of \addfontfeatures (user manual of fontspec, sec. III.2), it only affects the current font family. The \thin used after \addfontspec changes the font family, hence cancels effect of \addfontspec.