[Tex/LaTex] How to change the font size in LuaLaTeX

fontsizefontspecluatex

\documentclass{minimal}

\usepackage[paperheight = 140mm,% comprimento 
            paperwidth  = 200mm,% altura
            margin      = 10mm  % tamanho da margem
            ]{geometry}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{xcolor}

\setmainfont[Color=brown]{Tangerine}

\begin{document}
    Normal pleasure of your company is requested
\end{document}

I'm making a wedding invitation and I'm not sure how do it using LuaLaTeX.

I want to set, in \setmainfont, the default color and size but I don't know how. I'm able to set the color, as in the example, but not the size at the same time.
\setmainfont[SizeFeatures={Size=30}]{Tangerine} sets the size, but I don't know how put it together. Is it possible?

Furthermore, how do I change the font size in the middle of the document? I tried \Huge but got an error.

Best Answer

\Huge did not work because you used the minimal document class, which does not provide any font size commands. Use the usual article instead.

You shouldn't also need to set font size with fontspec, too. Use any of these options:

  • To set a default font size document-wise, pass one of the options 10pt, 11pt or 12pt to the document class.
  • Use the usual font size commands (\small, \normalsize, \large, etc.).
  • If none of the above have the size you need, select it manually with \fontsize{<size>}{<leading>}. A \selectfont command has to follow immediately after.

The two latter options also can be used document-wise: just put them right after \begin{document} outside any groups.

To sum up, an example document:

\documentclass[10pt]{article}

\usepackage{fontspec}
\usepackage{xcolor}

\setmainfont[Color=brown]{Linux Libertine}

\begin{document}

Lorem {\Huge ipsum} dolor {\fontsize{14pt}{16pt}\selectfont sit} amet.

\end{document}

enter image description here