# Font size for poster and XeLaTeX does not always work

I'm trying to create a poster, and for that I'm using the following (which I need to compile with XeLaTeX):

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX} % to have the automatics ligatures of TeX

\setromanfont[SizeFeatures={Size=36}]{Avenir}


This works well, but then I can't use \textit, \emph, or even math formulas, because it seems the text goes back to size 10.

This is the MWE:

\documentclass[a4paper]{article}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX} % to have the automatics ligatures of TeX

\setromanfont[SizeFeatures={Size=36}]{Avenir}

\begin{document}

Testing font with \emph{emphasized text} and math: $a+b =1$.

\end{document}


You can't use the Size key for this. You could use Scale=3.6 but this will affect only the text font. To really change the fontsizes you should better redefine \normalsize and the other size commands. E.g. with a KOMA-class this is easy:

\RequirePackage{fix-cm} %for the math
\documentclass[fontsize=36pt]{scrartcl}

\usepackage{fontspec}

\setmainfont{Arial}

\begin{document}

Testing font with \emph{emphasized text} and math: $a+b =1$.

\end{document}


That's not the purpose of SizeFeatures.

Define a proper size option; here's how in memoir, you can look at mem36.clo in order to import in your document a suitable set of definitions.

\documentclass[a4paper,extrafontsizes,36pt]{memoir}

\usepackage{fontspec}
%\defaultfontfeatures{Ligatures=TeX} % set by default

\setmainfont{Avenir}

\begin{document}

Testing font with \emph{emphasized text} and math: $a+b =1$.

\end{document}