Not an answer because the question as far as I can understand it relates to the standalone image(PDF) to be included in the main file, with the proviso that the standalone PDF be compiled only once to save compilation time.
If, instead, standalone source code is used, the standalone PDF will inherit any applicable main document settings like fontsize but the standalone PDF will be (re)compiled on each run of the main document.
If source code is used:
(Original answer)
Don't use font=\normalsize
inside your tikz picture.
(a) Your question code does not load tikz at the correct time: "Environment tikzpicture undefined.", says the log. tikz
package needs to be loaded before tikz commands can be used.
No illustration (a).
(b) \begin{tikzpicture}[x=1em, y=1em, font=\normalsize]
sets the fontsize inside the rectangle, overriding the font size used in and by the calling file at that point in the processing. The rectangle size is set to relative font size (em
) so expands or contracts with it.

MWE
\begin{filecontents*}{pic\jobname.tex}
\documentclass{standalone}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}[x=1em, y=1em, font=\normalsize]
\draw (0,0) rectangle node{Test} (2,2);
\end{tikzpicture}
\end{document}
\end{filecontents*}
\documentclass{article}
\usepackage{tikz}
\usepackage[fontsize=14pt]{scrextend}
\usepackage[mode=build, subpreambles=false]{standalone}
\begin{document}
\section*{b}
fontsize = 14pt \includestandalone{pic\jobname}
\huge fontsize huge \includestandalone{pic\jobname}
\tiny fontsize tiny \includestandalone{pic\jobname}
\end{document}
(c) Do \begin{tikzpicture}[x=1em, y=1em]
so as not to override the font size.

MWE
\begin{filecontents*}{pic\jobname.tex}
\documentclass{standalone}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}[x=1em, y=1em]
\draw (0,0) rectangle node{Test} (2,2);
\end{tikzpicture}
\end{document}
\end{filecontents*}
\documentclass{article}
\usepackage{tikz}
\usepackage[fontsize=14pt]{scrextend}
\usepackage[mode=build, subpreambles=false]{standalone}
\begin{document}
\section*{c}
fontsize = 14pt \includestandalone{pic\jobname}
\huge fontsize huge \includestandalone{pic\jobname}
\tiny fontsize tiny \includestandalone{pic\jobname}
\end{document}
(d) Notice that inside the included file, formatting commands (e.g., colour) are restricted to the file itself. This implies that the contents of the included file are processed in their own group (as if with {
...}
or equivalents).

MWE
\begin{filecontents*}{pic\jobname.tex}
\documentclass{standalone}
\usetikzlibrary{shapes}
\begin{document}
\color{red}
inside
\begin{tikzpicture}[x=1em, y=1em]
\draw (0,0) rectangle node{Test} (2,2);
\end{tikzpicture}
\end{document}
\end{filecontents*}
\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage[fontsize=14pt]{scrextend}
\usepackage[mode=build, subpreambles=false]{standalone}
\begin{document}
\section*{d}
fontsize = 14pt \includestandalone{pic\jobname}
\huge fontsize huge \includestandalone{pic\jobname}
\tiny fontsize tiny \includestandalone{pic\jobname}
\end{document}
(e) Fontsize option for the documentclass works as expected.

MWE
\begin{filecontents*}{pic\jobname.tex}
\documentclass{standalone}
\usetikzlibrary{shapes}
\begin{document}
\color{red}
inside
\begin{tikzpicture}[x=1em, y=1em]
\draw (0,0) rectangle node{Test} (2,2);
\end{tikzpicture}
\end{document}
\end{filecontents*}
\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{scrextend}
\usepackage[mode=build, subpreambles=false]{standalone}
\begin{document}
\section*{e}
\fontname\font\\
fontsize = 12pt \includestandalone{pic\jobname}
\huge \fontname\font\\ fontsize huge \includestandalone{pic\jobname}
\tiny\fontname\font\\ fontsize tiny \includestandalone{pic\jobname}
\end{document}
LaTeX Warning: Unused global option(s): [32pt]
- valid sizes are 8,10, 12, I think. You may need to use relative-size commands like\huge
, or fontspec'sScale=
option.font=\normalsize
in the include intentional?filecontents
needs the[overwrite]
option, if experimenting.